src/main/kotlin/de/uapcore/lightpit/RequestMapping.kt

changeset 227
f0ede8046b59
parent 225
87328572e36f
child 254
55ca6cafc3dd
equal deleted inserted replaced
226:c8e1b5282f69 227:f0ede8046b59
302 ValidationError("validation.date.format") 302 ValidationError("validation.date.format")
303 } 303 }
304 } 304 }
305 } 305 }
306 306
307 fun boolValidator(input: String?): ValidationResult<Boolean> {
308 return if (input.isNullOrBlank()) {
309 ValidatedValue(false)
310 } else {
311 ValidatedValue(!(input.equals("false", true) || input == "0"))
312 }
313 }
314
307 // </editor-fold> 315 // </editor-fold>

mercurial