API Reference 0.3.24dart_web_toolkit_validationRegExpValidationResult

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.

docs inherited from ValidationResult
RegExpValidationResult(bool isError, String message, {
 this.matchedString: "",
 this.matchedIndex: 0,
 this.matchedSubstrings:null}):super(isError, message);

Properties

final bool isError #

inherited from ValidationResult

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 #

inherited from ValidationResult

Validation error message.

final String message

Methods

String toString() #

inherited from ValidationResult

Use message content to convert that instance to String.

String toString() {
 return message == null ? "" : message;
}