[Form Validation] Support Both Old and New Syntax Mixed
See original GitHub issueFirst of all, I’d like to thank you for an amazing shorthand syntax for Form Validation, that makes working with Semantic UI much more of a pleasure.
Unfortunately what seems for me to be broken is the use of full and shorthand syntax together. In cases of long form where we just want to change one of prompts (f.e. for regexp to state which signs are valid), it forces us to use old syntax all the way.
Is there a possibility to do that? Or maybe I just didn’t notice something?
Tested on Semantic UI package for Meteor, of course updated to 2.1.4
fields: {
password: ['minLength[5]', 'empty'],
email: 'email',
username: {
identifier: 'username',
rules: [
{
type: 'empty',
prompt: 'Somehow this isn`t working'
}
]
}
}
Error message in console:
"Form:" "There is no rule matching the one you specified" "username"
TypeError: rule.type.match is not a function
Issue Analytics
- State:
- Created 8 years ago
- Reactions:1
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Working with Angular 4 Forms: Nesting and Input Validation
Validating user inputs is an essential part of any robust web application. Angular 4 makes it especially easy for both template-driven and reactive...
Read more >Restrict data input by using validation rules - Microsoft Support
You can compare values across different fields using a record validation rule. For example, a record with two date fields might require that...
Read more >Angular Custom Form Validators: Complete Guide
In this post, you will learn everything that you need to know in order to implement your own custom form validators, including both...
Read more >yup validation on multiple values - formik - Stack Overflow
How should I write the validation schema if I want to have at least one of the fields is not empty, then that's...
Read more >Using FluentValidation for Forms Validation in Blazor
The first is a new validator component to use in place of the DataAnnotationsValidator which comes as default. Then we need to create...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
👍 using both style together would be super.
until then document should state that
Shorthand Validation
andFull Validation
can’t be used together.This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.