Contributor I

How to limit guest name length

How to control length of "name" form of guest self registration page to be certian number of characters ?

Example: guest user is allowed to enter max length of 20 characters as a name.


MVP Expert

Re: How to limit guest name length

On the Guest module, go to the form and edit the fields. Click on the "Name" field and click Edit. Go down to Form Validation Properties and select a validator as "IsRegexMatch" and in the Validator Argument field, enter:


 And that should allow only upper and lower case letters along with a minimum of 1 character and a maximum of 20 characters.


Might want to fact-check me on the [a-Z] part and make sure it includes both uppercase and lowercase, but that should effectively do what you need. 

Michael Haring
If my answer is helpful, a Kudos is always appreciated!
Contributor I

Re: How to limit guest name length

Thanks Michael..

I found another solution as well, edit filed, visitor_name, and change max length to 20. 

Search Airheads
Showing results for 
Search instead for 
Did you mean: