1.1 --- a/src/main/kotlin/de/uapcore/lightpit/RequestMapping.kt Wed Aug 18 15:04:59 2021 +0200 1.2 +++ b/src/main/kotlin/de/uapcore/lightpit/RequestMapping.kt Wed Aug 18 15:30:49 2021 +0200 1.3 @@ -304,4 +304,12 @@ 1.4 } 1.5 } 1.6 1.7 +fun boolValidator(input: String?): ValidationResult<Boolean> { 1.8 + return if (input.isNullOrBlank()) { 1.9 + ValidatedValue(false) 1.10 + } else { 1.11 + ValidatedValue(!(input.equals("false", true) || input == "0")) 1.12 + } 1.13 +} 1.14 + 1.15 // </editor-fold>