DRY & KISS Principles

Why does this implementation violate both DRY and KISS principles?
class UserValidator {
  validateUsername(username) {
    if (username.length < 3) return 'Username too short';
    if (username.length > 20) return 'Username too long';
    if (!/^[a-zA-Z0-9_]+$/.test(username)) return 'Invalid characters';
    return null;
  }

  validatePassword(password) {
    if (password.length < 3) return 'Password too short';
    if (password.length > 20) return 'Password too long';
    if (!/^[a-zA-Z0-9_]+$/.test(password)) return 'Invalid characters';
    return null;
  }
}
Next Question (4/20)