forked from MapComplete/MapComplete
		
	UX: trim mastodon handles when inputted, fix #1791
This commit is contained in:
		
							parent
							
								
									bed8fb0bf9
								
							
						
					
					
						commit
						e6ec24da80
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		|  | @ -17,6 +17,7 @@ export default class FediverseValidator extends Validator { | |||
|      * @param s | ||||
|      */ | ||||
|     reformat(s: string): string { | ||||
|         s = s.trim() | ||||
|         if (!s.startsWith("@")) { | ||||
|             s = "@" + s | ||||
|         } | ||||
|  | @ -35,6 +36,7 @@ export default class FediverseValidator extends Validator { | |||
|         return undefined | ||||
|     } | ||||
|     getFeedback(s: string): Translation | undefined { | ||||
|         s = s.trim() | ||||
|         const match = s.match(FediverseValidator.usernameAtServer) | ||||
|         console.log("Match:", match) | ||||
|         if (match) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue