The code below validates an Israeli phone number in Gravity Forms.
Instructions:
1. place the code snippet in function.php
2. Add a phone filed in your gravity form.
3. Under appearance add a custom scc class named “israeli”.
Phone numbers who don’t mach the Israeli phone numbers pattern will invoke a validation error and prevent form submition.