form-js / forms.js

Fully featured javascript form builder
https://formsjs.io/
8 stars 4 forks source link

Updated telephone field validation. #74

Closed HoHoHoCCH closed 2 weeks ago

HoHoHoCCH commented 2 weeks ago

Removed + symbol and 1st number requirement, size can be between 7-15 characters. Changes reflected in telephone field docs.

HoHoHoCCH commented 2 weeks ago

Fixes https://github.com/form-js/forms.js/issues/72

HoHoHoCCH commented 2 weeks ago

Updated pull request to include newer regex.

Trilmatic commented 2 weeks ago

Updated pull request to include newer regex.

Please update to /^\+?\d{1,3}?[-.\s]?\(?\d{1,4}?\)?([-.\s]?\d{1,9})*$/ and i will merge it. Thank you.

HoHoHoCCH commented 2 weeks ago

Please update to /^\+?\d{1,3}?[-.\s]?\(?\d{1,4}?\)?([-.\s]?\d{1,9})*$/ and i will merge it. Thank you.

Updated, let me know if there's anything else.

Trilmatic commented 2 weeks ago

Please update to /^\+?\d{1,3}?[-.\s]?\(?\d{1,4}?\)?([-.\s]?\d{1,9})*$/ and i will merge it. Thank you.

Updated, let me know if there's anything else.

We will need to update the test case variable INVALID_PHONE_VALUE in packages\core\src\tests\test.options.ts

Just put something that will not match the pattern.

You can run tests with npm run test to see if it is passing