Answer
I can only answer the last point for the regex validation.
You switched the order in the implementation to 4-4-3 instead of 3-4-4 digits.
The sequences 010, 020, 030, 040, 050, 060, 070, 080, 090 can be matched using 0[1-9]0
and you should not escape the \[
or else you will match it literally.
The updated code might look like:
$pattern = "/^0[1-9]0-\d{4}-\d{4}$/";
0 comments:
Post a Comment
Thanks