Custom validation example is broken
See original GitHub issueThere is no controls
and values
variables in the code provided in README.
myValidators = { "/passwordCheck": (value, property, form) => { if (controls.password !== undefined && controls.password.valid && value !== values.password) { return { "passwordCheck": { "expectedValue": "same as 'password'" } } } return null; } }
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:5
Top Results From Across the Web
Custom Validator not firing - Stack Overflow
Basically, I have an asp:customvalidator that I am trying to add to a validationgroup with other validators so that all error messages ...
Read more >Custom validation not working on clientside - MSDN - Microsoft
I've used an example I found to create a custom dataannotationattribute in mvc. It's working on the serverside, but not on the clientside....
Read more >15.11 Creating and Using a Custom Validator - Java Platform ...
For example, an e-commerce application might use a general-purpose custom validator called FormatValidator.java to validate input data against a format ...
Read more >Custom Data Validation in Excel : formulas and rules - Ablebits
Learn how to use custom Data Validation in Excel with your own rules and formulas. Formula examples to allow only numbers or text...
Read more >DevExtreme - JavaScript Validator Custom Rule
Set this field to "custom" to define a rule that will be broken as a result of custom validation performed by the validationCallback...
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 FreeTop 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
Top GitHub Comments
Hi @JianhuisHuang , I just updated the example at stackblitz. So there is now also an example with a custom validator using custom error messages.
This is a common structure for an error object to return in your custom validator
you can freely choose this
the path of the property this error should be addressed to and marked invalid
some validation error text
some values to replace in text template
Same here, I was following the readme on custom validation but it doesn’t wrok correctly. It looks like the guide is missing some details. Please update, greatly appreciate it.