Hi Stevenson,
You can use the input mask feature to restrict the input value.
The final result will look like this:
Best Regards,
Ricardo Pereira
If your field is a string, you can use the input mask? https://docs.mendix.com/refguide/text-box/#282-input-mask is X any character? For example, the input mask 99-LLL-9999
matches 24-apr-2008