def METHOD_NAME(form, field):
    regex_bool = re.match(
        r'^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*\W)[a-zA-Z0-9\S]{6,}$',
        field.data)
    if not regex_bool:
        raise ValidationError(message)