You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: