@@ -3322,14 +3322,14 @@ final class Validators {
33223322 val.betweenLength (min, max, betweenLengthMsg: betweenLengthMsg);
33233323
33243324 // DateTime Validators
3325- /// {@template validator_is_after }
3325+ /// {@template validator_after }
33263326 /// Creates a [DateTime] validator that checks if an input date occurs after
33273327 /// `reference` .
33283328 ///
33293329 /// ## Parameters
33303330 /// - `reference` (`DateTime` ): The baseline date against which the input will be compared.
33313331 /// This serves as the minimum acceptable date (exclusive by default).
3332- /// - `isAfterMsg ` (`String Function(DateTime input, DateTime reference)?` ): Optional custom
3332+ /// - `afterMsg ` (`String Function(DateTime input, DateTime reference)?` ): Optional custom
33333333 /// error message generator. When provided, it receives both the input and reference
33343334 /// dates to construct a context-aware error message.
33353335 /// - `inclusive` (`bool` ): When set to `true` , allows the input date to exactly match
@@ -3343,36 +3343,36 @@ final class Validators {
33433343 /// ## Examples
33443344 /// ```dart
33453345 /// // Basic usage requiring date after January 1st, 2025
3346- /// final validator = isAfter (DateTime(2025));
3346+ /// final validator = Validators.after (DateTime(2025));
33473347 ///
33483348 /// // Inclusive validation allowing exact match
3349- /// final inclusiveValidator = isAfter (
3349+ /// final inclusiveValidator = Validators.after (
33503350 /// DateTime(2024),
33513351 /// inclusive: true,
33523352 /// );
33533353 ///
33543354 /// // Custom error message
3355- /// final customValidator = isAfter (
3355+ /// final customValidator = Validators.after (
33563356 /// DateTime(2024),
33573357 /// isAfterMsg: (_, ref) => 'Please select a date after ${ref.toString()}',
33583358 /// );
33593359 /// ```
33603360 /// {@endtemplate}
3361- static Validator <DateTime > isAfter (
3361+ static Validator <DateTime > after (
33623362 DateTime reference, {
3363- String Function (DateTime input, DateTime reference)? isAfterMsg ,
3363+ String Function (DateTime input, DateTime reference)? afterMsg ,
33643364 c.bool inclusive = false ,
33653365 }) =>
3366- val.isAfter (reference, isAfterMsg : isAfterMsg , inclusive: inclusive);
3366+ val.after (reference, afterMsg : afterMsg , inclusive: inclusive);
33673367
3368- /// {@template validator_is_before }
3368+ /// {@template validator_before }
33693369 /// Creates a [DateTime] validator that checks if an input date occurs before
33703370 /// `reference` .
33713371 ///
33723372 /// ## Parameters
33733373 /// - `reference` (`DateTime` ): The baseline date against which the input will be compared.
33743374 /// This serves as the maximum acceptable date (exclusive by default).
3375- /// - `isBeforeMsg ` (`String Function(DateTime input, DateTime reference)?` ): Optional custom
3375+ /// - `beforeMsg ` (`String Function(DateTime input, DateTime reference)?` ): Optional custom
33763376 /// error message generator. When provided, it receives both the input and reference
33773377 /// dates to construct a context-aware error message.
33783378 /// - `inclusive` (`bool` ): When set to `true` , allows the input date to exactly match
@@ -3387,29 +3387,29 @@ final class Validators {
33873387 /// ## Examples
33883388 /// ```dart
33893389 /// // Basic usage requiring date before January 1st, 2025
3390- /// final validator = isBefore (DateTime(2025));
3390+ /// final validator = Validators.before (DateTime(2025));
33913391 ///
33923392 /// // Inclusive validation allowing exact match
3393- /// final inclusiveValidator = isBefore (
3393+ /// final inclusiveValidator = Validators.before (
33943394 /// DateTime(2024),
33953395 /// inclusive: true,
33963396 /// );
33973397 ///
33983398 /// // Custom error message
3399- /// final customValidator = isBefore (
3399+ /// final customValidator = Validators.before (
34003400 /// DateTime(2024),
34013401 /// isBeforeMsg: (_, ref) => 'Please select a date before ${ref.toString()}',
34023402 /// );
34033403 /// ```
34043404 /// {@endtemplate}
3405- static Validator <DateTime > isBefore (
3405+ static Validator <DateTime > before (
34063406 DateTime reference, {
3407- String Function (DateTime input, DateTime reference)? isBeforeMsg ,
3407+ String Function (DateTime input, DateTime reference)? beforeMsg ,
34083408 c.bool inclusive = false ,
34093409 }) =>
3410- val.isBefore (reference, isBeforeMsg : isBeforeMsg , inclusive: inclusive);
3410+ val.before (reference, beforeMsg : beforeMsg , inclusive: inclusive);
34113411
3412- /// {@template validator_is_date_time_between }
3412+ /// {@template validator_date_time_between }
34133413 /// Creates a [DateTime] validator that checks if an input date falls within a specified
34143414 /// range defined by `minReference` and `maxReference` .
34153415 ///
@@ -3422,7 +3422,7 @@ final class Validators {
34223422 /// Input dates must occur after this date (or equal to it if `minInclusive` is true).
34233423 /// - `maxReference` (`DateTime` ): The upper bound of the acceptable date range.
34243424 /// Input dates must occur before this date (or equal to it if `maxInclusive` is true).
3425- /// - `isDateTimeBetweenMsg ` (`String Function(DateTime, DateTime, DateTime)?` ): Optional
3425+ /// - `dateTimeBetweenMsg ` (`String Function(DateTime, DateTime, DateTime)?` ): Optional
34263426 /// custom error message generator. When provided, it receives the input date and both
34273427 /// reference dates to construct a context-aware error message.
34283428 /// - `minInclusive` (`bool` ): When set to `true` , allows the input date to exactly match
@@ -3443,39 +3443,39 @@ final class Validators {
34433443 /// ## Examples
34443444 /// ```dart
34453445 /// // Basic usage requiring date between 2023 and 2025
3446- /// final validator = isDateTimeBetween (
3446+ /// final validator = Validators.dateTimeBetween (
34473447 /// DateTime(2023),
34483448 /// DateTime(2025),
34493449 /// );
34503450 ///
34513451 /// // Inclusive validation allowing exact matches
3452- /// final inclusiveValidator = isDateTimeBetween (
3452+ /// final inclusiveValidator = Validators.dateTimeBetween (
34533453 /// DateTime(2023),
34543454 /// DateTime(2025),
34553455 /// minInclusive: true,
34563456 /// maxInclusive: true,
34573457 /// );
34583458 ///
34593459 /// // Custom error message
3460- /// final customValidator = isDateTimeBetween (
3460+ /// final customValidator = Validators.dateTimeBetween (
34613461 /// DateTime(2023),
34623462 /// DateTime(2025),
34633463 /// isDateTimeBetweenMsg: (_, min, max) =>
34643464 /// 'Please select a date between ${min.toString()} and ${max.toString()}',
34653465 /// );
34663466 /// ```
34673467 /// {@endtemplate}
3468- static Validator <DateTime > isDateTimeBetween (
3468+ static Validator <DateTime > dateTimeBetween (
34693469 DateTime minReference,
34703470 DateTime maxReference, {
34713471 String Function (
34723472 DateTime input, DateTime minReference, DateTime maxReference)?
3473- isDateTimeBetweenMsg ,
3473+ dateTimeBetweenMsg ,
34743474 c.bool leftInclusive = false ,
34753475 c.bool rightInclusive = false ,
34763476 }) =>
3477- val.isDateTimeBetween (minReference, maxReference,
3478- isDateTimeBetweenMsg : isDateTimeBetweenMsg ,
3477+ val.dateTimeBetween (minReference, maxReference,
3478+ dateTimeBetweenMsg : dateTimeBetweenMsg ,
34793479 minInclusive: leftInclusive,
34803480 maxInclusive: rightInclusive);
34813481
0 commit comments