Closed making closed 7 months ago
Arguments3Validator<String, String, Integer, Car> validator = Yavi.arguments() ._string("manufacturer", c -> c.notNull()) ._string("licensePlate", c -> c.notNull().greaterThanOrEqual(2).lessThanOrEqual(14)) ._integer("seatCount", c -> c.greaterThanOrEqual(2)) .apply(Car::new); Validated<Car> validated = validator.validate("foo", "bar", 3); // or Car car = validator.validated("foo", "bar", 3);