How to not accept blank and space input for a frontend web registration form using python flask?

Viewed 15

I have a code to create new f_name, l_name, email, id in my program, however it accepts any kind of input all variables. But, I want to limit the empty space/ whitespace to reject invalid input such as f_name, l_name, email, id

1 Answers
    if value is not None and hasattr(value, 'strip'):
        return value.strip()

    return value```
Related