API Reference 0.3.24dart_web_toolkit_validationValidationResult

ValidationResult class

The ValidationResult class contains the results of a validation.

class ValidationResult {
 
 /**
  * Pass true if there was a validation error.
  */
 final bool isError;
 
 /**
  * Validation error message.
  */
 final String message;
 
 /**
  * Create new instance of [ValidationResult]. You might specify [isError] if
  * validation process finished with error and pass throug result [message].
  */
 ValidationResult(this.isError, this.message);
 
 /**
  * Use [message] content to convert that instance to String.
  */
 String toString() {
   return message == null ? "" : message;
 }
}

Subclasses

RegExpValidationResult

Constructors

new ValidationResult(bool isError, String message) #

Create new instance of ValidationResult. You might specify isError if validation process finished with error and pass throug result message.

ValidationResult(this.isError, this.message);

Properties

final bool isError #

Pass true if there was a validation error.

final bool isError

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;
}