mds_plugin/mysql_database_service.py
def validate_mysql_password(password):
    """Validates the given password using the default MDS MySQL password rules

    - Should have at least one number.
    - Should have at least one uppercase and one lowercase character.
    - Should have at least one special symbol.
    - Should be between 8 to 20 characters long.

    Args:
        password (str): The password to validate

    Returns:
        True if the given password is valid, False otherwise
    """
    import re

    reg = (r"^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*#?&])"
           r"[A-Za-z\d@$!#%*?&]{6,20}$")

    # compiling regex
    pattern = re.compile(reg)

    # searching regex
    return re.search(pattern, password)
Validates the given password using the default MDS MySQL password rules

    - Should have at least one number.
    - Should have at least one uppercase and one lowercase character.
    - Should have at least one special symbol.
    - Should be between 8 to 20 characters long.

    Args:
        password (str): The password to validate

    Returns:
        True if the given password is valid, False otherwise
    
Validates the given password using the default MDS MySQL password rules
Should have at least one number.
Should have at least one uppercase and one lowercase character.
Should have at least one special symbol.
Should be between 8 to 20 characters long.
Validates the given password using the default MDS MySQL password rules Should have at least one number . Should have at least one uppercase and one lowercase character . Should have at least one special symbol . Should be between 8 to 20 characters long .
def validate_mysql_password(password):
    import re
    reg = (r"^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*#?&])"
           r"[A-Za-z\d@$!#%*?&]{6,20}$")
    pattern = re.compile(reg)
    return re.search(pattern, password)
def validate_mysql_password ( password ) : import re reg = ( r"^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*#?&])" r"[A-Za-z\d@$!#%*?&]{6,20}$" ) pattern = re . compile ( reg ) return re . search ( pattern , password )
Validates the given password using the default MDS MySQL password rules
 Should have at least one number.
Validates the given password using the default MDS MySQL password rules Should have at least one number .
"""Validates the given password using the default MDS MySQL password rules

    - Should have at least one number.
    - Should have at least one uppercase and one lowercase character.
    - Should have at least one special symbol.
    - Should be between 8 to 20 characters long.

    Args:
        password (str): The password to validate

    Returns:
        True if the given password is valid, False otherwise
    """ # compiling regex
 # searching regex

True if the given password is valid, False otherwise
True if the given password is valid False otherwise
password
The password to validate
The password to validate