Enhancement of Required-Validation - Mendix Forum

Enhancement of Required-Validation


Hi Everybody!

I noticed some strange behaviour regarding the validation of required fields. It is enough to simply press Space and this (more or less) empty field will pass the validation.
My understanding of a required field would be to actually have some content. Of course you can write your own validation, but it would be interesting to know why this implementation was used - maybe there is some good idea behind it?


Best Regards,

3 answers

The forms have great validation options for `required` validation on the data model can use regex




Yes of course - I also do that at the moment. Still, I think it would make sense that a Space-Char does not pass the validation, since it holds as much information as no input at all.


As space is a character it seems logical that this required validation will pass when entering a space char.

This can be solved with a custom validation that trims the field value before checking.