From 03abc656d4e7fb23b17e96d1fe1a2d0d7411f6ce Mon Sep 17 00:00:00 2001 From: Anthony Date: Wed, 4 Sep 2024 20:06:02 +0100 Subject: [PATCH] v5.82.2 --- CHANGELOG.md | 5 +++++ example/pubspec.lock | 6 +++--- lib/validation/rules.dart | 18 +++++------------- pubspec.lock | 4 ++-- pubspec.yaml | 4 ++-- 5 files changed, 17 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 03e9730..d124683 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## [5.82.2] - 2024-09-04 + +* Fix max validation rule +* pubspec.yaml dependency updates + ## [5.82.1] - 2024-08-09 * pubspec.yaml dependency updates diff --git a/example/pubspec.lock b/example/pubspec.lock index 6e25b13..7fa99b6 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -93,10 +93,10 @@ packages: dependency: transitive description: name: dio - sha256: e17f6b3097b8c51b72c74c9f071a605c47bcc8893839bd66732457a5ebe73714 + sha256: "5598aa796bbf4699afd5c67c0f5f6e2ed542afc956884b9cd58c306966efc260" url: "https://pub.dev" source: hosted - version: "5.5.0+1" + version: "5.7.0" dio_web_adapter: dependency: transitive description: @@ -331,7 +331,7 @@ packages: path: ".." relative: true source: path - version: "5.82.1" + version: "5.82.2" page_transition: dependency: transitive description: diff --git a/lib/validation/rules.dart b/lib/validation/rules.dart index 4a96fac..3cc8021 100644 --- a/lib/validation/rules.dart +++ b/lib/validation/rules.dart @@ -447,19 +447,11 @@ class MaxRule extends ValidationRule { dynamic data = info['data']; if (data is String) { - // Check if the string is a number - if (double.tryParse(data) != null) { - this.description = "$attribute must be a maximum of $intMatch."; - this.textFieldMessage = "Must be a maximum of $intMatch."; - super.handle(info); - return (double.tryParse(data)! < intMatch); - } else { - this.description = - "$attribute must be a maximum length of $intMatch characters."; - this.textFieldMessage = "Must be a maximum of $intMatch characters."; - super.handle(info); - return (data.length < intMatch); - } + this.description = + "$attribute must be a maximum length of $intMatch characters."; + this.textFieldMessage = "Must be a maximum of $intMatch characters."; + super.handle(info); + return (data.length < intMatch); } if (data is int) { diff --git a/pubspec.lock b/pubspec.lock index a031ee1..c2e82cb 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -93,10 +93,10 @@ packages: dependency: "direct main" description: name: dio - sha256: e17f6b3097b8c51b72c74c9f071a605c47bcc8893839bd66732457a5ebe73714 + sha256: "5598aa796bbf4699afd5c67c0f5f6e2ed542afc956884b9cd58c306966efc260" url: "https://pub.dev" source: hosted - version: "5.5.0+1" + version: "5.7.0" dio_web_adapter: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index ec70064..d25b9ec 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: nylo_support description: Support library for the Nylo framework. This library supports routing, widgets, localization, cli, storage and more. -version: 5.82.1 +version: 5.82.2 homepage: https://nylo.dev repository: https://github.com/nylo-core/support/tree/5.x issue_tracker: https://github.com/nylo-core/support/issues @@ -22,7 +22,7 @@ dependencies: theme_provider: ^0.6.0 validated: ^2.0.0 flutter_staggered_grid_view: ^0.7.0 - dio: ^5.4.3+1 + dio: ^5.7.0 recase: ^4.1.0 get_time_ago: ^1.3.1 flutter_styled_toast: ^2.2.1