Timeline for Check and validate the phone number and replace if it's in the wrong format
Current License: CC BY-SA 3.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 8, 2015 at 10:51 | comment | added | leylandski |
To get rid of special characters such as '+', you can use the replace(target, replacement) method using '+' as the target. I would advise using an empty string ('') as the replacement value, as there is more that can go wrong the more characters you individually replace. Check out the documentation for String methods for more info.
|
|
Sep 8, 2015 at 10:45 | comment | added | Akash | Thanks a lot friends for your valuable solutions. Could you please tell me how would I elaborate the above trigger if I need to check the phone length is 10 digit only followed by 0? I also need to replace '+' with 0(if phone number start with +) and '+91' with 0. (if phone number start with + followed by country code) | |
Sep 8, 2015 at 10:40 | vote | accept | Akash | ||
Sep 8, 2015 at 10:19 | history | answered | leylandski | CC BY-SA 3.0 |