@ file : Jvm Name (" MaxLength Rule Dsl ") Ċ Ċ package Ġcom . nat ig bab ay ev . checkpoint . core . rules . length Ċ Ċ import Ġcom . nat ig bab ay ev . checkpoint . core . Rule Ċ Ċ /** Ċ Ġ* Ġ@ param Ġblock Ġa Ġlambda Ġwhich Ġwill Ġbe Ġinvoked Ġwhen Ġ[ MaxLength Rule . can Pass ] Ġreturns Ġfalse . Ċ Ġ*/ Ċ inline Ġfun ĠMax Length Rule . Builder . when Invalid ( cross inline Ġblock : Ġ( CharSequence ) Ġ-> ĠUnit ) Ġ= Ġapply Ġ{ ĊĠĠĠ Ġwhen Invalid ( Rule . Callback Ġ{ Ġblock ( it ) Ġ}) Ċ } Ċ Ċ /** Ċ Ġ* Ġ@ param Ġwhen Invalid Ġa Ġlambda Ġwhich Ġwill Ġbe Ġinvoked Ġwhen Ġ[ MaxLength Rule . can Pass ] Ġreturns Ġfalse . Ċ Ġ* Ġ@ return Ġinstance Ġof Ġ[ MaxLength Rule ] Ċ Ġ*/ Ċ inline Ġfun ĠmaxLength Rule ( ĊĠĠĠ ĠmaxLength : ĠInt , ĊĠĠĠ Ġcross inline Ġwhen Invalid : Ġ( CharSequence ) Ġ-> ĠUnit Ċ ): ĠMax Length Rule Ġ{ ĊĠĠĠ Ġval Ġbuilder Ġ= ĠMax Length Rule . Builder () ĊĠĠĠĠĠĠĠ Ġ. maxLength ( maxLength ) ĊĠĠĠĠĠĠĠ Ġ. when Invalid ( Rule . Callback Ġ{ Ġwhen Invalid ( it ) Ġ}) ĊĠĠĠ Ġreturn Ġbuilder . build () Ċ } Ċ Ċ /** Ċ Ġ* Ġ@ return Ġinstance Ġof Ġ[ MaxLength Rule ] Ġwithout Ġany Ġcallback . Ċ Ġ*/ Ċ fun ĠmaxLength Rule ( maxLength : ĠInt ): ĠMax Length Rule Ġ{ ĊĠĠĠ Ġval Ġbuilder Ġ= ĠMax Length Rule . Builder () ĊĠĠĠĠĠĠĠ Ġ. maxLength ( maxLength ) ĊĊĠĠĠ Ġreturn Ġbuilder . build () Ċ } Ċ