package Ġcom . jo h ng ach i hi . park ing . web . park ing Tar iff Settings Ċ Ċ import Ġcom . jo h ng ach i hi . park ing . entities . Par king Tar iff Ċ import Ġcom . jo h ng ach i hi . park ing . services . park ing Tar iff Settings . is Upper Limit Unique Ċ import Ġjavax . validation . Constraint Ċ import Ġjavax . validation . Constraint Validator Ċ import Ġjavax . validation . Constraint Validator Context Ċ import Ġjavax . validation . Payload Ċ import Ġkotlin . reflect . K Class Ċ Ċ @ Target ( Annotation Target . FIELD ) Ċ @ Must Be Document ed Ċ @ Constraint ( validated By Ġ= Ġ[ Unique Upper Limit Validator :: class ]) Ċ annotation Ġclass ĠUnique Upper Limit ( ĊĠĠĠ Ġval Ġmessage : ĠString Ġ= Ġ" Upper Ġlimits Ġmust Ġbe Ġunique ", ĊĠĠĠ Ġval Ġgroups : ĠArray < K Class <* >> Ġ= Ġ[], ĊĠĠĠ Ġval Ġpayload : ĠArray < K Class < out ĠPayload >> Ġ= Ġ[] Ċ ) ĊĊ Ċ class ĠUnique Upper Limit Validator Ġ: ĊĠĠĠ ĠConstraint Validator < Unique Upper Limit , ĠList < Par king Tar iff >> Ċ { ĊĠĠĠ Ġoverride Ġfun ĠisValid ( value : ĠList < Par king Tar iff > ?, Ġcontext : ĠConstraint Validator Context ): ĠBoolean Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġvalue ?. let Ġ{ Ġis Upper Limit Unique ( it ) Ġ} Ġ?: Ġtrue ĊĠĠĠ Ġ} Ċ }