Function: asBoolean()
asBoolean(
options
?):TTransformer
<boolean
,TBoolean
>
Create a boolean transformer. Accept case-insensitive 'true' or 'false' and 0 or 1.
Parameters
Parameter | Type | Description |
---|---|---|
options ? | SchemaOptions | Validation options (see SchemaOptions) |
Returns
TTransformer
<boolean
, TBoolean
>
Example
ts
Column('isDone', asBoolean());