Blame view

frontend/web/js/validation/src/additional/phoneNL.js 315 Bytes
394e2db6   Administrator   Importers CRUD
1
2
3
4
5
6
  /**
   * Dutch phone numbers have 10 digits (or 11 and start with +31).
   */
  $.validator.addMethod("phoneNL", function(value, element) {
  	return this.optional(element) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(value);
  }, "Please specify a valid phone number.");