Created
November 9, 2015 16:26
-
-
Save alber70g/0d8c852c0adfcc8c6547 to your computer and use it in GitHub Desktop.
Validation json example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"fieldName": "FirstFieldNr", | |
"validationRules": [ | |
{ | |
"type": "required", | |
"errorKey": "fieldRequired", | |
"condition": null | |
} | |
] | |
}, | |
{ | |
"fieldName": "DependantField", | |
"validationRules": [ | |
{ | |
"type": "required", | |
"errorKey": "fieldRequired", | |
"condition": { | |
"type": "compareFieldToValue", | |
"left": "FirstFieldNr", | |
"right": 18, | |
"operator": ">=" | |
} | |
} | |
] | |
}, | |
{ | |
"fieldName": "AnotherDependantField", | |
"validationRules": [ | |
{ | |
"type": "required", | |
"errorKey": "fieldRequired", | |
"condition": { | |
"type": "compareFieldToValue", | |
"left": "FirstFieldNr", | |
"right": 18, | |
"operator": "<" | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment