Skip to content

Commit b25b98c

Browse files
committed
feat: modify tryValidate method to accept dynamic data
1 parent 961848e commit b25b98c

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 1.5.1
2+
- Change `Map<String, dynamic>` entry data to `dynamic` in `tryValidate`
3+
14
## 1.5.0
25
- Added support for all schemas as a high-level entry schema
36
- Add benchmarks in [`Dartmark`](https://dartmark.dev) website

lib/src/vine.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,7 @@ final class Validator implements ValidatorContract {
130130

131131
Validator(this._schema, this.errors);
132132

133-
(ValidationException?, Map<String, dynamic>?) tryValidate(
134-
Map<String, dynamic> data) {
133+
(ValidationException?, T?) tryValidate<T>(dynamic data) {
135134
try {
136135
final result = validate(data);
137136
return (null, result);

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: vine
22
description: Vine is a robust, typed validation library for Dart/Flutter, designed to simplify and secure data management in applications
3-
version: 1.5.0
3+
version: 1.5.1
44
repository: https://github.com/LeadcodeDev/vine
55

66
platforms:

0 commit comments

Comments
 (0)