MembershipPassword class

MembershipPassword validator permits you to check that a string value is accordance with declared settings.

Inheritance

Constructors

MembershipPassword({@required int minLength, @required int maxLength, @required bool includesAlphabeticalCharacters, @required bool includesUppercaseCharacters, @required bool includesNumericalCharacters, @required bool includesSpecialCharacters, @required String error})
const

Properties

criticityLevel int
This reprensents the order of execution for validation. If a validator returns false, the queue will stop on this point. Nexts validators won't be fired.
final, inherited
error String
This is the custom error to return in case of invalidation.
final
hashCode int
The hash code for this object. [...]
read-only, inherited
includesAlphabeticalCharacters bool
If true, forces to add alphabetical characters to the password.
final
includesNumericalCharacters bool
If true, forces to add numerical characters to the password.
final
includesSpecialCharacters bool
If true, forces to add special characters to the password.
final
includesUppercaseCharacters bool
If true, forces to add uppercase characters to the password.
final
maxLength int
This is the maximal string length of your password.
final
minLength int
This is the minimal string length of your password.
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

isValid<TModel>(Object value, TModel model) bool
Verify if the model is valid compared to the current validator You must add value parameter, this one is your current property to validate. model parameter is also required, even if your custom validator won't use it. It reprensents your full object model with all values. Maybe you would validate a property in comparison to others.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited

Static Methods

getErrorDetails(String value, int minLength, int maxLength, bool includesAlphabeticalCharacters, bool includesUppercaseCharacters, bool includesNumericalCharacters, bool includesSpecialCharacters) Map<String, bool>
getErrorDetails provides error details. For each options, specify if it's a success or a failure.