Hi all, am surprised this hasn't come up before but can't see anywhere else on the forums where this has been asked.
We have a custom form with required fields, submit empty fields and get error messages, all good.
However, we want it to also fail if the user enters only whitespace in a required field. E.g. if they put a single space as their surname it should fail. Currently a whitespace seems to be acceptable. Have tested all the way up to v5.1. Basicaly I want to do a trim before attempting validation. Seems to not be do-able out of the box. There's a couple of complex validation rules we could be using, perhaps most promising is regex, but is this what we really want?
Has anybody else had this issue, how did you solve it? What's the best-practice? We want as vanilla as possible.
Thanks