#5678: Spanish Phone Validation
-----------------------------------------+----------------------------------
    Reporter:  CristianDeluxe            |          Type:  Enhancement
      Status:  new                       |      Priority:  Very Low   
   Milestone:  1.2.x.x                   |     Component:  Validation 
     Version:  RC2                       |      Severity:  Trivial    
    Keywords:  spanish phone validation  |   Php_version:  n/a        
Cake_version:                            |  
-----------------------------------------+----------------------------------
 Sorry for bad English.[[BR]]
 In line 721 of 'cake\libs\validation.php' file:[[BR]]

 {{{
 <?php
 case 'es_ES':
 default:
     $_this->regex  = '^[689]{1}[0-9]{1,2}[-. ]?[0-9]{1,3}[-.
 ]?[0-9]{2,3}[-. ]?[0-9]{1,3}$';
 break;
 ?>
 }}}

 Validate any Spanish phone, must start with 6, 8 or 9 number and must have
 9 digit of total length.[[BR]]
 Samples of spanish phones:[[BR]]

 924.227.227 valid[[BR]]
 924-227-227 valid[[BR]]
 924-22-72-27 valid[[BR]]
 924 22 72 27 valid[[BR]]
 924227227 valid[[BR]]
 624227227 valid // mobile number[[BR]]
 127227227 no valid[[BR]]
 924-227227 valid[[BR]]
 827-227227 valid // new number range (only in some cities of spain)[[BR]]
 91-2227227 valid[[BR]]
 myphone no valid[[BR]]

-- 
Ticket URL: <https://trac.cakephp.org/ticket/5678>
CakePHP : The Rapid Development Framework for PHP <https://trac.cakephp.org/>
Cake is a rapid development framework for PHP which uses commonly known design 
patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC. 
Our primary goal is to provide a structured framework that enables PHP users at 
all levels to rapidly develop robust web applications, without any loss to 
flexibility.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"tickets cakephp" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/tickets-cakephp?hl=en
-~----------~----~----~----~------~----~------~--~---

  • [CakePHP : The Rapid Dev... CakePHP : The Rapid Development Framework for PHP

Reply via email to