LengthValidator

info.fingo.spata.schema.validator.LengthValidator

Validator verifying string length. Takes the length of string after trimming it off white characters. Treats strings with length at boundary as valid.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def apply(min: Int, max: Int): Validator[String]

Creates string length validator.

Creates string length validator.

Value parameters

max

maximum length

min

minimum length

Attributes

Returns

validator

def apply(length: Int): Validator[String]

Creates string length validator.

Creates string length validator.

Value parameters

length

required length

Attributes

Returns

validator