* feat(security): add approved rooms/users/domains as env variables * chore(lint): fix R0902 * chore(lint): fix C0114 * chore(lint): fix C0116 * chore(lint): fix C0413
		
			
				
	
	
		
			17 lines
		
	
	
		
			349 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			349 B
		
	
	
	
		
			Python
		
	
	
	
	
	
"""Standalone helper functions."""
 | 
						|
 | 
						|
import re
 | 
						|
 | 
						|
 | 
						|
def validate_email_syntax(email: str) -> bool:
 | 
						|
    """Validate email syntax.
 | 
						|
 | 
						|
    Args:
 | 
						|
        email (str): Email address.
 | 
						|
 | 
						|
    Returns:
 | 
						|
        bool: True if valid, else False.
 | 
						|
    """
 | 
						|
    pattern = r"^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$"
 | 
						|
    return re.match(pattern, email) is not None
 |