Last active
January 22, 2022 18:37
-
-
Save huseyinyildirim/e0b22718bc11443cf5f63bdaba96df98 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery.validator.addMethod("phoneTR", function (phone_number, element) { | |
//5321234567 | |
phone_number = phone_number.replace(/\s+/g, ""); | |
return this.optional(element) || phone_number.length > 9 && phone_number.match(/^5[0-9][0-9][1-9]([0-9]){2}([0-9]){4}$/); | |
}, "Lütfen telefon numarasını kontrol ediniz."); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment