Jump to content

Regex Validation


Adnan Zamurred
 Share

Recommended Posts

Hi there,

I've searched the wiki but couldn't find any example for regex expression. 

I need the following:

1. Regex validation for maximum of 100 words (Includes numbers and letters) 

2. Regex for email address e.g. @hotmail.co.uk

Can I get some assistance please? 

Link to comment
Share on other sites

For the word count you could try this:

^(?:\b\w+\b[\n\r\s]*){1,100}$

They may hit the character limit before the word limit though depending on the field used. You could add the text into the validation message "Max word limit reached" and add to the description of the field "Max 100 words"

For addresses it is simply

(.*@hotmail.com)

 

  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...