StringExtension extension

String extension with multiple validations.

on

Properties

hasNumber bool

Available on String, provided by the StringExtension extension

Determines whether the string contains at least one number.
no setter
hasUpperAndLowerCharacter bool

Available on String, provided by the StringExtension extension

Determines whether the string contains at least one upper- and lowercase character.
no setter
isAtLeastEightCharactersLong bool

Available on String, provided by the StringExtension extension

Determines whether the string is at least 8 characters long.
no setter
isEmptyOrWhitespace bool

Available on String, provided by the StringExtension extension

Determines whether the string is empty or contains only whitespaces.
no setter
isUserNameValid bool

Available on String, provided by the StringExtension extension

Determines whether the string is a valid username or not.
no setter
isValidEmail bool

Available on String, provided by the StringExtension extension

Determines whether the string is a valid email address.
no setter
isValidName bool

Available on String, provided by the StringExtension extension

Determines whether the string is a valid name (only letters and spaces).
no setter
isValidPassword bool

Available on String, provided by the StringExtension extension

Determines whether the password string is valid or not.
no setter
isValidPhoneNumber bool

Available on String, provided by the StringExtension extension

Determines whether the string is a valid phone number (starts with 00 or +).
no setter
trimToTwenty String

Available on String, provided by the StringExtension extension

Trims the string to 20 characters and adds three dots at the end. Returns original string if length is not more than 20.
no setter

Methods

generateMd5({String? saltString}) String

Available on String, provided by the StringExtension extension

Generates the md5 hash with an optional saltString.