Open BryceStevenWilley opened 2 years ago
I like the idea of using the regex on screen to validate what the user enters, and also finding a way to send the "other contact info" to Tyler so people with international phones can use that.
I don't think people will be too surprised that the system prevents international phone numbers
Entering the phone number incorrectly causes errors with Tyler's system. They give a regex ("PartyPhone" Data Field Row) that the phone number has to match. The regex is
^(+0?1\s)?(?\d{3})?\d{3}\d{4}$
, and there's already a hack in that removes-
if it doesn't match the first time. However, we can't fix it if someone's typed something wrong, like123oeurch
.Quick fix: use the validated al phone number field to make sure an phone number is being entered, embed it on the same screen that we have the other contact info on, so they don't have to enter one, but if they do, it's validated. However this won't restrict the countries the numbers come from, leading people with phones in other countries still to the same error screen.
Alternatively, we can try to validate it with the regex, and if it doesn't work, put it in a different Tyler field. There aren't any general notes per case party, but there is a general comments on the filing itself that we could put the phone number (or the general "how to contact me" section that we are still showing, but aren't doing anything with).
Validation sucks, especially when it's with a regex, that doesn't handle extensions, and only handles US numbers.