def unique_username_validator(form, field):
    """ Ensure that Username is unique. This validator may NOT be customized."""
    user_manager =  current_app.user_manager
    if not user_manager.db_manager.username_is_available(field.data):
        raise ValidationError(_('This Username is already in use. Please try another one.'))
def unique_username_validator ( form , field ) : user_manager = current_app . user_manager if not user_manager . db_manager . username_is_available ( field . data ) : raise ValidationError ( _ ( 'This Username is already in use. Please try another one.' ) )
Ensure that Username is unique. This validator may NOT be customized.