PHP Classes

File: public/asset/vendor/jquery-validation/src/additional/phonePL.js

Recommend this page to a friend!
  Classes of fathurrahman   mnTemplate   public/asset/vendor/jquery-validation/src/additional/phonePL.js   Download  
File: public/asset/vendor/jquery-validation/src/additional/phonePL.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: mnTemplate
Route HTTP requests to callback functions
Author: By
Last change:
Date: 1 year ago
Size: 1,023 bytes
 

Contents

Class file image Download
/** * Polish telephone numbers have 9 digits. * * Mobile phone numbers starts with following digits: * 45, 50, 51, 53, 57, 60, 66, 69, 72, 73, 78, 79, 88. * * Fixed-line numbers starts with area codes: * 12, 13, 14, 15, 16, 17, 18, 22, 23, 24, 25, 29, 32, 33, * 34, 41, 42, 43, 44, 46, 48, 52, 54, 55, 56, 58, 59, 61, * 62, 63, 65, 67, 68, 71, 74, 75, 76, 77, 81, 82, 83, 84, * 85, 86, 87, 89, 91, 94, 95. * * Ministry of National Defence numbers and VoIP numbers starts with 26 and 39. * * Excludes intelligent networks (premium rate, shared cost, free phone numbers). * * Poland National Numbering Plan http://www.itu.int/oth/T02020000A8/en */ $.validator.addMethod( "phonePL", function( phone_number, element ) { phone_number = phone_number.replace( /\s+/g, "" ); var regexp = /^(?:(?:(?:\+|00)?48)|(?:\(\+?48\)))?(?:1[2-8]|2[2-69]|3[2-49]|4[1-68]|5[0-9]|6[0-35-9]|[7-8][1-9]|9[145])\d{7}$/; return this.optional( element ) || regexp.test( phone_number ); }, "Please specify a valid phone number" );