validate abstract method

Iterable<String> validate()

Validates the current instance and returns a list of error messages if the instance is invalid.

Returns an empty list if the instance is valid.

Example usage:

class MyValidator implements Validator {
  @override
  List<String> validate() {
    List<String> errors = [];

    // Perform validation logic here

    return errors;
  }
}

Implementation

Iterable<String> validate();