SuffolkLITLab / docassemble-MotionToStayEviction

A Docassemble interview for the Massachusetts Appeals Court Motion to Stay Eviction
https://www.courtformsonline.org/appeals/#stayeviction
MIT License
0 stars 0 forks source link

Entering phone number incorrectly causes errors on our side #64

Open BryceStevenWilley opened 1 year ago

BryceStevenWilley commented 1 year ago

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, like 123oeurch.

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.

nonprofittechy commented 1 year 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