ryse Posted June 26, 2015 Share Posted June 26, 2015 Hello. I am new to Regular Expression Validation Strings, I am trying to implement a REQUIRED field whereby the client enters a FOUR DIGIT number so I can use it to verify it is them like with GoDaddy. I used the expression [0-9]{1-4} (My friend told me that) but it doesn't work and just comes up with "value is not valid". I need an expression to validate that the value is an integer and is 4 digits in length. Any help appreciated. Thanks in advance! 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted June 26, 2015 Share Posted June 26, 2015 http://docs.whmcs.com/Custom_Fields#Regular_Expression_Validation have a go at using the following, untried but I think it's correct.. /^[0-9]{4}$/ 0 Quote Link to comment Share on other sites More sharing options...
ryse Posted June 26, 2015 Author Share Posted June 26, 2015 /^[0-9]{4}$/ Hi Brian, That worked perfect. Thanks soo much! 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.