Phone number validation

Hello

I want a validation for Mobile number to be 10 digits and starts with zero

I wrote this in the xls form (., ‘^[0-9][0-9]{10}$’)
and it did not work

@Kal_Lam @stephanealoo

Hello @bkryasim,

You might be forgetting putting regex at the beginning of constraint, for us to better understand, can you provide a screenshot showing exactly what you are writing to where?

1 Like

this is the xlsform

Hi @bkryasim,

Can you try, and see if this works?

regex(., ‘^[0]{1}[0-9]{9}$’)

Also: Make sure you have the value numbers under the appearance column. This restricts the display of alphabets, making only numbers visible for inputs.

1 Like

Thank you hakan
It is now working

2 Likes