core
0.40.1
js
core
/
de.peekandpoke.kraft.addons.forms.validation
Package-level
declarations
Types
Functions
Types
Generic
Rule
Link copied to clipboard
js
data
class
GenericRule
<
T
>
(
checkFn
:
(
value
:
T
)
->
Boolean
,
messageFn
:
(
value
:
T
)
->
String
=
{ "Invalid input" }
)
:
Rule
<
T
>
Kraft
Forms
Rule
Dsl
Link copied to clipboard
js
@
DslMarker
annotation class
KraftFormsRuleDsl
Or
Rule
Link copied to clipboard
js
class
OrRule
<
T
>
(
rules
:
List
<
Rule
<
T
>
>
)
:
Rule
<
T
>
Rule
Link copied to clipboard
js
interface
Rule
<
T
>
Functions
any
Of
Link copied to clipboard
js
fun
<
T
>
anyOf
(
values
:
(
)
->
Collection
<
T
>
,
message
:
(
T
)
->
String
)
:
Rule
<
T
>
fun
<
T
>
anyOf
(
values
:
Collection
<
T
>
,
message
:
String
=
"Must be a valid input"
)
:
Rule
<
T
>
equal
To
Link copied to clipboard
js
fun
<
T
>
equalTo
(
compareWith
:
T
,
message
:
String
=
"Must be equal to '"
)
:
Rule
<
T
>
fun
<
T
>
equalTo
(
compareWith
:
(
)
->
T
,
message
:
(
T
)
->
String
)
:
Rule
<
T
>
fun
<
T
>
equalTo
(
compareWith
:
(
)
->
T
,
message
:
String
=
"Must be equal to '"
)
:
Rule
<
T
>
given
Link copied to clipboard
js
fun
<
T
>
given
(
check
:
(
T
)
->
Boolean
,
message
:
(
T
)
->
String
=
{ "Must be a valid input" }
)
:
Rule
<
T
>
none
Of
Link copied to clipboard
js
fun
<
T
>
noneOf
(
values
:
(
)
->
Collection
<
T
>
,
message
:
(
T
)
->
String
)
:
Rule
<
T
>
fun
<
T
>
noneOf
(
values
:
(
)
->
Collection
<
T
>
,
message
:
String
=
"Must be a valid input"
)
:
Rule
<
T
>
fun
<
T
>
noneOf
(
values
:
Collection
<
T
>
,
message
:
String
=
"Must be a valid input"
)
:
Rule
<
T
>
non
Null
Link copied to clipboard
js
fun
<
T
>
nonNull
(
message
:
String
=
"Must not be empty"
)
:
Rule
<
T
>
not
Equal
To
Link copied to clipboard
js
fun
<
T
>
notEqualTo
(
compareWith
:
T
,
message
:
String
=
"Must not be equal to '"
)
:
Rule
<
T
>
fun
<
T
>
notEqualTo
(
compareWith
:
(
)
->
T
,
message
:
(
T
)
->
String
=
{ "Must not be equal to '$compareWith()'" }
)
:
GenericRule
<
T
>
fun
<
T
>
notEqualTo
(
compareWith
:
(
)
->
T
,
message
:
String
=
"Must not be equal to '"
)
:
Rule
<
T
>