required<T> static method

ValidationRule<T> required<T>({
  1. String? message,
})

Creates a Required validation rule.

This rule checks if a value is required and can optionally include a custom validation message.

Implementation

static ValidationRule<T> required<T>({String? message}) =>
    Required<T>(message: message);