<How to create custom validator with parameters in...
# stackoverflow
u
How to create custom validator with parameters in spring boot? I have written a validator for cron string that checks for a minimal interval. @Constraint(validatedBy = [ValidMinimalInterval.JsonStringValidator::class]) @Target(AnnotationTarget.FIELD, AnnotationTarget.CLASS, AnnotationTarget.PROPERTY_GETTER) @Retention(AnnotationRetention.RUNTIME) @MustBeDocumented annotation class ValidMinimalInterval( val message: String = "The cron string doesn't fit in the minimal interval of 60 minutes", val groups: Array = [], val payload: Array = [] )...