Skip to content

Instantly share code, notes, and snippets.

@alber70g
Created November 9, 2015 16:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alber70g/0d8c852c0adfcc8c6547 to your computer and use it in GitHub Desktop.
Save alber70g/0d8c852c0adfcc8c6547 to your computer and use it in GitHub Desktop.
Validation json example
{
"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