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.

