DateAfter.fromString constructor

DateAfter.fromString(
  1. String date, {
  2. String? format,
  3. String? message,
})

Creates a new instance of the DateAfter validation rule from a string representation.

  • date: The date string to parse and compare against.
  • format: The format of the date string (optional).
  • message: A custom validation message (optional) to be displayed when the validation fails.

Implementation

DateAfter.fromString(String date, {String? format, String? message})
    : date = DateFormat(format).parse(date),
      super(message);