Skip to content

Commit f275915

Browse files
Merge pull request #7 from ebabhi/main
equality check for Validator
2 parents dcd3be5 + 6f3bd5a commit f275915

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

Diff for: CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 3.1.7
2+
- Equality added for validator
3+
14
# 3.1.6
25

36
- Re-land logger

Diff for: lib/src/form/validators.dart

+4-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ part of 'form.dart';
55
/// A [Validator] is base class for handling form validation.
66
///
77
/// {@endtemplate}
8-
abstract class Validator<T> {
8+
abstract class Validator<T> extends Equatable {
99
/// {@macro validator}
1010
const Validator(this.message);
1111
final String? message;
@@ -15,6 +15,9 @@ abstract class Validator<T> {
1515
String? call(T value) {
1616
return isValid(value) ? null : message;
1717
}
18+
19+
@override
20+
List<Object?> get props => [message];
1821
}
1922

2023
/// {@template emailValidator}

Diff for: pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: fp_util
22
description: Utilities and Extensions for num,BuildContext,EdgeInsets,File,String. constants for horizontal and vertical spacing.
3-
version: 3.1.6
3+
version: 3.1.7
44
homepage: https://docs.kishormainali.com/
55
repository: https://github.com/kishormainali/fp_util
66
issue_tracker: https://github.com/kishormainali/fp_util/issues

0 commit comments

Comments
 (0)