Mandatory Validation with trim

By Kaushal Kumar on 13 Aug 2015
By default, Outsystems supports mandatory validation, however if user just types space then validation is considered as passed. Can we do validation after trim.
In case it is not feasible, please check the feasibility of
1.       Exposing a new flag (mandatory check with trim) or
2.       Exposing an attribute at application/espace/page/webblock level to override the mandatory validation (may be via a javascript or so)
We are raising this request, at it is observed that for these things developers are writing code, which looks as overhead.
Carlos Henriques13 Aug 2015
It's useless, because if the user can't use the space to skip the mandatory fields we will type anything like a dot "." or some random letters.
Steven14 Dec 2015

You can use the Text Function Trim(Text) in Built-in Functions to removes all leading and trailing white spaces from a text. and then validate it.


Caio Santana23 Dec 2015

I think this would increase complexity when creating forms.

You could try using a masking plugin (such as CustomMasks) to prevent the user from creating leading/trailing whitespaces. Since the mask runs on the clientside, there is no overhead on the serverside.