[ACA-3742] Metadata - constraints validation (#5908)

* card min max value validator

* card match value validator

* card value length validator

* map validators to constraint type

* add minmax

* update exported validators

* register validators based on constraint type

* translate errors with parameters

* tests
This commit is contained in:
Cilibiu Bogdan
2020-07-24 18:58:07 +03:00
committed by GitHub
parent 154ca07aad
commit aa3d890342
15 changed files with 223 additions and 12 deletions

View File

@@ -175,7 +175,10 @@
"NONE": "None",
"VALIDATORS": {
"FLOAT_VALIDATION_ERROR": "Use a number format",
"INT_VALIDATION_ERROR": "Use an integer format"
"INT_VALIDATION_ERROR": "Use an integer format",
"LENGTH_VALIDATION_ERROR": "Value should be minimum {{ minLength }} and maximum {{ maxLength }} in length",
"MATCH_VALIDATION_ERROR": "Value doesn't match pattern: {{ expression }}",
"MINMAX_VALIDATION_ERROR": "Value should be between minimum {{ minValue }} and maximum {{ maxValue }}"
},
"MORE": "More"
},