Closed
Description
Using a 'required' validator such as below, I'm able to get past the validation by just entering a space (or multiple spaces).
This differs from the default jQuery MVC + Unobtrusive behaviour where spaces are treated as an empty string and fail validation.
<input data-val="true" data-val-required="Field cannot be blank." id="FieldName" name="FieldName" type="text" />
I think it is this line;
return Boolean(value);
Which could be reworked as;
return Boolean(value?.trim());
Link to source;
I can do a pull request if you agree that it's correct.
Thanks both of you for your work on this.
Ryan
Metadata
Metadata
Assignees
Labels
No labels