Closed corvus-ch closed 10 months ago
@corvus-ch Should leading/trailing whitespaces automatically be removed, or the form field marked as invalid (and submitting not allowed)? I can see pro/cons for either: automatically removing them makes it easier for the user as they don't have to think about it, however can lead to confusion if they, for some reason, want a trailing whitespace, and it just disappears.
Some values must be RFC 1123 and RFC 1035 compliant where leading and trailing are invalid. For the remaining values, having leading/trailing white spaces is confusing at best. So, I err on the side of just strait remove them.
Description
Whites aces from the beginning and the end of user input, should be removed.
Additional Context
This should be asserted on the API side but is not (https://ticket.vshn.net/browse/APUB-501). Before we change this, we would like the frontend to mitigate this up.
Logs
Expected Behavior
White spaces from the start and the beginning and end of user input should be removed.
Steps To Reproduce
Entering data with a white space at the front and or the end.