Avatar

Correct answer by
Level 10

Hi there,

don't forget to mention to your regular expression that you want your text to end exactly with these characters...

right now, your regular expression validate if it is true that the value entered contains exactly either (XXX-XX-XXXX) OR (XX-XXXXXXX)

After this being validated it doesn't verify whether if the text ends there or not, as long as this is what it contains it's good with it...

If you want to make sure that you have a maximum length in your string you want it to be entered, don't forget the use of $

Hope this help!

View solution in original post