Skip to content

Commit

Permalink
Updated Validation.Length message to be shorter
Browse files Browse the repository at this point in the history
  • Loading branch information
darkfrog26 committed Jan 22, 2019
1 parent f9451be commit 1b19b60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dom/src/main/scala/io/youi/form/Validation.scala
Expand Up @@ -24,7 +24,7 @@ object Validation {
}

def Length(minimum: Int = 0, maximum: Int = Int.MaxValue): Validation = {
Conditional(input => (minimum to maximum).contains(input.value.length), name => s"$name must be a minimum of $minimum characters and a maximum of $maximum characters")
Conditional(input => (minimum to maximum).contains(input.value.length), name => s"$name must be between $minimum and $maximum length")
}
def EqualTo(that: FormInput): Validation = Conditional(_.option == that.option, name => s"$name must be equal to ${that.name.capitalize}")
def NotEqual(bad: => String, message: String => String): Validation = Conditional(!_.option.contains(bad), message)
Expand Down

0 comments on commit 1b19b60

Please sign in to comment.