Start a new topic
Answered

Letters only validation

Hi All, I have a doubt, someone know how I can validate that a field that only accepts Strings no numbers? 


Best Answer

you can create your own SemQL Validation in your entity and use a REGEXP_LIKE condition in it, like this :

NOT REGEXP_LIKE(FirstName, '[0-9]')


Then you have to make sure of when the SemQL Validation is triggered, and I would recommend having a look at this community post about possible options (the post mentions a Mandatory validation, but all the trigger options are the same for all Validations).

Don't hesitate to have a look at our SemQL Reference Guide for more information about REGEXP_LIKE and other available functions for the database you are running on.

1 Comment

Answer

you can create your own SemQL Validation in your entity and use a REGEXP_LIKE condition in it, like this :

NOT REGEXP_LIKE(FirstName, '[0-9]')


Then you have to make sure of when the SemQL Validation is triggered, and I would recommend having a look at this community post about possible options (the post mentions a Mandatory validation, but all the trigger options are the same for all Validations).

Don't hesitate to have a look at our SemQL Reference Guide for more information about REGEXP_LIKE and other available functions for the database you are running on.

Login to post a comment