RegExpValidationResult class
The RegExpValidationResult class is a child class of the ValidationResult class, and contains additional properties used with regular expressions.
class RegExpValidationResult extends ValidationResult { /** * An integer that contains the starting index in the input String of the match. */ final int matchedIndex; /** * A String that contains the substring of the input String that matches the * regular expression. */ final String matchedString; /** * An Array of Strings that contains parenthesized substring matches, if any. * If no substring matches are found, this result is of length 0. * Use [matchedSubStrings[0]] to access the first substring match. */ List matchedSubstrings; RegExpValidationResult(bool isError, String message, { this.matchedString: "", this.matchedIndex: 0, this.matchedSubstrings:null}):super(isError, message); }
Extends
ValidationResult > RegExpValidationResult
Constructors
new RegExpValidationResult(bool isError, String message, {String matchedString: "", int matchedIndex: 0, List matchedSubstrings: null}) #
Create new instance of ValidationResult. You might specify isError if validation process finished with error and pass throug result message.
RegExpValidationResult(bool isError, String message, { this.matchedString: "", this.matchedIndex: 0, this.matchedSubstrings:null}):super(isError, message);
Properties
final bool isError #
Pass true if there was a validation error.
final bool isError
final int matchedIndex #
An integer that contains the starting index in the input String of the match.
final int matchedIndex
final String matchedString #
A String that contains the substring of the input String that matches the regular expression.
final String matchedString
List matchedSubstrings #
An Array of Strings that contains parenthesized substring matches, if any. If no substring matches are found, this result is of length 0. Use [matchedSubStrings[0]] to access the first substring match.
List matchedSubstrings
final String message #
Validation error message.
final String message
Methods
String toString() #
Use message
content to convert that instance to String.
String toString() { return message == null ? "" : message; }