Password class

Password validated against a configurable set of rules. Every rule is opt-in via the constructor and defaults match the previous fixed behaviour (min. 5 chars, at least one uppercase and one special char).

Inheritance

Constructors

Password.dirty(String value, {int minLength = 5, bool requireUppercase = true, bool requireLowercase = false, bool requireNumber = false, bool requireSpecialChar = true})
const
Password.pure({int minLength = 5, bool requireUppercase = true, bool requireLowercase = false, bool requireNumber = false, bool requireSpecialChar = true})
const

Properties

displayError → PasswordError?
The error to display if the FormzInput value is not valid and has been modified.
no setterinherited
error → PasswordError?
Returns a validation error if the FormzInput is invalid. Returns null if the FormzInput is valid.
no setterinherited
errorMessage → String?
no setter
hashCode → int
The hash code for this object.
no setterinherited
isNotValid → bool
Whether the FormzInput value is not valid. A value is invalid when the overridden validator returns an error (non-null value).
no setterinherited
isPure → bool
If the FormzInput is pure (has been touched/modified). Typically when the FormzInput is initially created, it is created using the FormzInput.pure constructor to signify that the user has not modified it.
finalinherited
isValid → bool
Whether the FormzInput value is valid according to the overridden validator.
no setterinherited
minLength → int
final
requireLowercase → bool
final
requireNumber → bool
final
requireSpecialChar → bool
final
requireUppercase → bool
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
value → String
The value of the given FormzInput. For example, if you have a FormzInput for FirstName, the value could be 'Joe'.
finalinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited
validator(String value) → PasswordError?
A function that must return a validation error if the provided value is invalid and null otherwise.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited