Skip to content

Commit

Permalink
Release 0.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
spire-ffoston committed Feb 18, 2021
1 parent b6a8f8c commit e88547d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ updated throughout the repository.

## [Unreleased]

## v0.2.1

### Changed
- Better error messages for inbuilt validators

## v0.2.0

### Added
Expand Down
2 changes: 1 addition & 1 deletion validatron/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "validatron"
version = "0.2.0"
version = "0.2.1"
authors = ["Frankie Foston <[email protected]>"]
edition = "2018"
license = "MIT"
Expand Down
10 changes: 8 additions & 2 deletions validatron/src/validators.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ where
R: Display,
{
if *value < min {
Err(Error::new(format!("'{}' must be greater than or equal to '{}'", value, min)))
Err(Error::new(format!(
"'{}' must be greater than or equal to '{}'",
value, min
)))
} else {
Ok(())
}
Expand Down Expand Up @@ -93,7 +96,10 @@ where
R: Display,
{
if *value > max {
Err(Error::new(format!("'{}' must be less than or equal to '{}'", value, max)))
Err(Error::new(format!(
"'{}' must be less than or equal to '{}'",
value, max
)))
} else {
Ok(())
}
Expand Down
2 changes: 1 addition & 1 deletion validatron_derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "validatron_derive"
version = "0.2.0"
version = "0.2.1"
authors = ["Frankie Foston <[email protected]>"]
edition = "2018"
license = "MIT"
Expand Down

0 comments on commit e88547d

Please sign in to comment.