Function to check if the password meets this requirement.
final bool Function(String password) validator;