add helper method instead boolean expression
change CredentialsValidator to Validator<T>