Skip to main content
The result of validating a username against one or more rules.
Example
export interface UsernameValidationResult {
  /**
   * Indicates whether the username passed all validation rules.
   */
  isValid: boolean;

  /**
   * An array of {@link UsernameValidationError} objects representing
   * the individual rules that failed, if any.
   *
   * This array is empty if {@link UsernameValidationResult.isValid} is `true`.
   */
  errors: UsernameValidationError[];
}

Properties

errors
An array of UsernameValidationError objects representing the individual rules that failed, if any.This array is empty if UsernameValidationResult.isValid is true.
isValid
boolean
Indicates whether the username passed all validation rules.