External validator function#929
Conversation
Add the possibility to have an external validator function by passing to the validator an expression. Such as :
"$validators" : {
"equalsEmail" : "mustBeEqual(modelValue, 'email')"
}
|
@BulletAnt thanks for this, could you add a quick test case or show me a plunker that shows it working I can make a test case from? |
|
Sure, will do it when I have some time ;) |
|
Hi! I finally took the time to create a plunker that shows the "external" validator. Plus, in my project version (based on the bower version) I also added this to the parsers, and allow the $validators/$parsers/etc... definition directly in the schema. As I use one schema for two forms, it is easier to define those in the schema instead of the form. Let me know if you want me to add this in another PR. Cheers |
|
Hi @Anthropic, and Happy New Year ! Do you have any update on this PR ? Should I review some parts ? Cheers |
|
Hi @BulletAnt thanks for the nudge, I missed your Nov update! I'll take a look shortly, Nov-Jan were a write-off unfortunately, way too busy with work and then holidays. |
Add the possibility to have an external validator function by passing to the validator an expression. Such as :
"$validators" : {
"equalsEmail" : "mustBeEqual(modelValue, 'email')"
}
Description
Add your description here
Fixes Related issues
Checklist
@json-schema-form/angular-schema-form-lead