0

I am trying to validate a number field on the FSL app which should accept only 10 digits and check for the format of mobile numbers like '1234567890' or '(123) 456-7890'. Following all the rules and limitations as per the FSL guidelines. When I test the same on UI works as expected and I see a validation error if the user enters <10 or only with one '('.

here is my formula:

(NOT((LEN(({!Phone_Number})) = 11 && BEGINS(({!Phone_Number}), '(') && ISNUMBER(SUBSTITUTE(({!Phone_Number}), '(', '')))||(LEN(({!Phone_Number})) = 11 && CONTAINS(({!Phone_Number}), ')') && ISNUMBER(SUBSTITUTE(({!Phone_Number}), ')', ''))))&&LEN(({!Phone_Number})) >= 10 && LEN(({!Phone_Number})) <= 14&&LEN(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(({!Phone_Number}), '(', ''), ')', ''), '-', ''), ' ', '')) = 10&&ISNUMBER(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(({!Phone_Number}), '(', ''), ')', ''), '-', ''), ' ', '')))

Please guide me if I am doing anything wrong here.

enter image description here

enter image description here

4
  • did we got any solution for this? Commented Jul 9, 2024 at 5:00
  • Yes,i used regex : "REGEX({!Phone_Number}, "^\(?(\\d{3})\)?[- ]?(\\d{3})[- ]?(\\d{4})$")" Commented Jul 10, 2024 at 15:22
  • Thanks for the answer. The regex works , however the validation message shown on the mobile is not same as the validation message defined. It gives this generic error 'Unable to validate field...'. Is this a limitation? Commented Sep 14, 2024 at 10:39
  • That seems like FSL is unable to validate your input with the formula you used. Please share a screenshot so that I can see what you configured. Commented Sep 20, 2024 at 2:22

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.