The validation only applies to the password fields, so it shouldn't be reinitialised every time the widget is opened. This function call can be done at the bottom.