startsWith method

Validator startsWith(
  1. String prefix, {
  2. String? message,
})

Ensures the value starts with a specific prefix.

Implementation

Validator startsWith(String prefix, {String? message}) {
  _rules.add(StartsWithRule(prefix, message ?? _messages.startsWith));
  return this;
}