-
Notifications
You must be signed in to change notification settings - Fork 297
Closed
Description
The length of the string is trimmed before being checked for length. This means a string "1234 " is reported with a length of 4 passing our validation check and sent onto our server which fails because it has 5 characters.
Whilst ultimately we don't want spaces after our part numbers, the discrepancy between the string stored in the Backbone model (5 chars) and what is reported back from backbone.validation is not ideal. If we trim the text before sending to the server then it will have been generated from a different code path. If we trim the text before validation, then the trim is performed twice.
Turns out this is the case with Length and minLength.
Metadata
Metadata
Assignees
Labels
No labels