Usage example
Simple example of how to use library
import pl.muninn.simple.validation._
case class LoginRequest(login:String, password:String)
val schema:ValidationSchema[LoginRequest] = createSchema { context =>
context.field(_.login).notEmpty +
context.field(_.password).notEmpty
}
// schema: ValidationSchema[LoginRequest] = <function1>
val result = schema.validate(LoginRequest("admin", "admin"))
// result: ValidationResult = Valid(a = ())
result.isValid
// res0: Boolean = true
Library provides
Library allows to use two different ways of creating validation schema .
It also provides simple way of