validateUsername function

String? validateUsername(
  1. String? value
)

Validates the given value as a username.

Returns an error message if validation fails, or null if valid.

Implementation

String? validateUsername(String? value) =>
    Validators.validate(value, ValidationRules.username);