SJEaton Posted October 12, 2017 Share Posted October 12, 2017 Hi Does regex validation only allow you to indicate what can be entered or can you for example set it up so that 0000 can't be entered? Sam Link to comment Share on other sites More sharing options...
Victor Posted October 12, 2017 Share Posted October 12, 2017 @SJEaton the regex validation does what it says, mening to validate the input against the pattern you configured. If the input text matches the pattern in regex configuration then the text is validated and user allowed to continue. If the input text does not match the pattern in regex configuration then the text is invalidated and the user is not allowed to continue. So if you create a pattern to invalidate 0000, the user will still be able to type in this text but the user will get a visual warning that the text is invalid and it will lock the user in that form until the text is validated... Link to comment Share on other sites More sharing options...
Martyn Houghton Posted October 12, 2017 Share Posted October 12, 2017 @SJEaton You if you are trying to accept a four digit number you could use "(?!0000)[0-9]{4}", to exclude them entering 0000. You could extend that to exclude other common numbers. (?!0000|1111|2222|3333|4444|5555|6666|7777|8888|9999|1234|4321)[0-9]{4} Cheers Martyn 1 Link to comment Share on other sites More sharing options...
SJEaton Posted October 12, 2017 Author Share Posted October 12, 2017 Sounds good Martyn we'll give it a go Sam Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now