LIVR icon indicating copy to clipboard operation
LIVR copied to clipboard

Include error-specific details to the validation errors

Open amakhrov opened this issue 9 years ago • 1 comments

Use case: value: [{min_length: 10}]

When this validation fails it just returns 'TOO_LONG' error code. However, quite often we need to show the user how many characters are actually expected.

Can you think of a good way to include this data (actual length limit in that case) into the error output?

amakhrov avatar Feb 16 '16 20:02 amakhrov

Not a part of spec, but currently it can be implemented in the following way https://github.com/koorchik/js-validator-livr/pull/7#issuecomment-122299180

koorchik avatar Mar 10 '16 12:03 koorchik