Jun-09-2024, 01:09 PM
hi all,
this is a small snippet from my python flask-wtf code
there username is
firstname.lastname
so if they type in either there firstname and or lastname it wont allow it
is this easy to do please
thanks,
rob
this is a small snippet from my python flask-wtf code
class PasswordForm(FlaskForm): un = StringField('Username', [InputRequired(message='please enter your Username')]) op = PasswordField('Current Password', [InputRequired(message='please enter your current password')]) np = PasswordField('New Password', [InputRequired(message='please enter your new password'), EqualTo('cnp', message='must match confirm new password'), Length(min=12), Regexp('.*[a-z]', message='must contain one lower case'), Regexp('.*[A-Z]', message='must contain one upper case'), Regexp('.*[0-9]', message='must contain one number'), Regexp('.*[\¬\!\"\£\$\%\^\&\*\(\)\_\+\`\-\=\{\}\:\@\~\<\>\?\[\]\;\'\#\,\.\/\\\|]', message='must contain one special character')]) cnp = PasswordField('Confirm New Password')i want to make another regex in the “np” to catch “un” and if it contains there username to not allow it
there username is
firstname.lastname
so if they type in either there firstname and or lastname it wont allow it
is this easy to do please
thanks,
rob