mirror of
				https://github.com/DerTyp7/explainegy-nextjs.git
				synced 2025-10-29 21:02:13 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			10 lines
		
	
	
		
			325 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			10 lines
		
	
	
		
			325 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| 
 | |
| export function isValidText(text: string): boolean {
 | |
|   const textRegex = /^[a-zA-Z\s\d\-_\(\)\[\]\{\}\!\@\#\$\%\^\&\*\+\=\,\.\?\/\\\|\'\":;]+$/;
 | |
|   return textRegex.test(text) && text.length > 0;
 | |
| }
 | |
| 
 | |
| export function isValidName(name: string): boolean {
 | |
|   const nameRegex = /^[a-zA-Z0-9\-_]+$/;
 | |
|   return nameRegex.test(name);
 | |
| } | 
