Skip to content

Commit

Permalink
v5.82.2
Browse files Browse the repository at this point in the history
  • Loading branch information
agordn52 committed Sep 4, 2024
1 parent 18c1f5c commit 03abc65
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 20 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -331,7 +331,7 @@ packages:
path: ".."
relative: true
source: path
version: "5.82.1"
version: "5.82.2"
page_transition:
dependency: transitive
description:
Expand Down
18 changes: 5 additions & 13 deletions lib/validation/rules.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down

0 comments on commit 03abc65

Please sign in to comment.