Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Unique Regex Custom Field < 25 characters

HH
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 27, 2019

Hi,

I'm using Unique Regex Custom Field. We have a regex field where we're trying to say only allow a minimum of 25 characters.

This is the regex: ^.{25,}$

But I can submit the word "test" which is only 4 characters. Can you see where I'm going wrong?

Thanks!

1 answer

0 votes
Haran Kumar
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 27, 2019

Hi @HH   

You can try using this regex   \w{25} 

This allows any alphabet or number and must be of minimum 25 characters . 

HH
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 27, 2019

That's not working for me either :(

Haran Kumar
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 27, 2019

Try these for your luck.

[a-z]*[A-Z]*[0-9]*{25,1000} 

or

[a-z]*[A-Z]*[0-9]*{25,} 


Regards

HH
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 27, 2019

No sorry those still don't work for me :( Also tried ^.{25,1000}$ in case it needed the last number as well :(

Haran Kumar
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 4, 2019

@HH , Sorry I'm not aware of any other applicable regex code. 
Maybe if someone is aware of , do help both of us in understanding over the requirement . 

Thanks  

Suggest an answer

Log in or Sign up to answer