Hi everyone, Can you help me to force the entry of the Surname and the 1st letter of the first name of an individual in Capital letters in a form
@tuumaprojectdata, have you gone through our support article Restricting Text Responses With Regular Expressions? It should help you solve your issue.
Maybe you could focus to this section of the article:
Yes I read it but my problem is not solved. I would like the names of the respondents to be written like this: Kobe BRYANT
Hello @tuumaprojectdata,
You can use the following regex
function:
regex(., '^[A-Z]{1}[a-z]{1,}[ ]{1}[A-Z]{1,}$')
You need to put this for the validation code.
OK, I’ll try it and see. Thank you
I thought you use Name SURNAME
as your format. In SURNAME Name
format you can use this one:
regex(., '^[A-Z]{1,}[ ]{1}[A-Z]{1}[a-z]{1,}$')
Thank you, the problem is partially solved if the person has only one first name; but if she has several first names the code does not work anymore
In that case you can try this one:
regex(., '^([A-Z]{1,}\s)([A-Z]{1}[a-z]{1,}\s?)+$')
It is resolved. Thank you. Also, can you help me code the numbers and date of the identity documents? in example: B12764538 of 15/09/2018
Hi Hakan,
This is Priyanka here. I want name to be entered only in capital letter. It can be 2 or 3 or 4 or 5 or 6 words in the name of the participant.
example: REEMA MISHRA OR REEMA DEVI MISHRA OR REEMA DEVI SHARMA MISHRA.
I used the following regex but and it allow 3 words in name eg REEMA DEVI MISHRA.
regex(., ‘^[A-Z]{1,}[ ][A-Z]{1,}[ ][A-Z]{1,}$’)
so my problem here is, some time it can be 2 words sometimes 3 or 4 or 5 so in this case what should be my regex?
Please help me on this.
Thank you Hakan!
It is working.
regex(., ‘^[A-Z\s]+$’) works too.