forked from MapComplete/MapComplete
		
	Port bicycle cafés to JSON-defined-layer
This commit is contained in:
		
							parent
							
								
									3653c3ecaa
								
							
						
					
					
						commit
						0c2f662040
					
				
					 17 changed files with 229 additions and 276 deletions
				
			
		|  | @ -43,14 +43,14 @@ export class ValidatedTextField { | |||
|         "email": (str) => EmailValidator.validate(str), | ||||
|         "url": (str) => str, | ||||
|         "phone": (str, country) => { | ||||
|             return parsePhoneNumberFromString(str, country.toUpperCase())?.isValid() ?? false; | ||||
|             return parsePhoneNumberFromString(str, country?.toUpperCase())?.isValid() ?? false; | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     public static formatting = { | ||||
|         "phone": (str, country) => { | ||||
|             console.log("country formatting", country) | ||||
|             return parsePhoneNumberFromString(str, country.toUpperCase()).formatInternational() | ||||
|             return parsePhoneNumberFromString(str, country?.toUpperCase()).formatInternational() | ||||
|         } | ||||
|     } | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue