tel: ajouter / comme séparateur valide
This commit is contained in:
		
							parent
							
								
									5fa5f718d2
								
							
						
					
					
						commit
						8cb71ab7d7
					
				@ -2,7 +2,7 @@
 | 
				
			|||||||
namespace nur\data\types;
 | 
					namespace nur\data\types;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class TelephoneType extends RegexpType {
 | 
					class TelephoneType extends RegexpType {
 | 
				
			||||||
  const PATTERN = '/^[0-9+, .()-]+/';
 | 
					  const PATTERN = '/^[0-9+, .()-\/]+/';
 | 
				
			||||||
  const PATTERN_NORMALIZED = '/^(\+?[0-9 ,]+)$/';
 | 
					  const PATTERN_NORMALIZED = '/^(\+?[0-9 ,]+)$/';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const COD_PAYS = [
 | 
					  const COD_PAYS = [
 | 
				
			||||||
@ -261,7 +261,7 @@ class TelephoneType extends RegexpType {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  protected function extractParsedValue(array $ms) {
 | 
					  protected function extractParsedValue(array $ms) {
 | 
				
			||||||
    $tel = $ms[0];
 | 
					    $tel = $ms[0];
 | 
				
			||||||
    $tel = preg_replace('/[ .()-]/', "", $tel);
 | 
					    $tel = preg_replace('/[ .()-\/]/', "", $tel);
 | 
				
			||||||
    $tel = preg_replace('/\+/', "00", $tel);
 | 
					    $tel = preg_replace('/\+/', "00", $tel);
 | 
				
			||||||
    $ntel = preg_replace('/[^0-9]/', "", $tel);
 | 
					    $ntel = preg_replace('/[^0-9]/', "", $tel);
 | 
				
			||||||
    # tel est le numéro avec chiffres et virgule
 | 
					    # tel est le numéro avec chiffres et virgule
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user