Constructor
new Field(type, options)
Parameters:
| Name | Type | Description |
|---|---|---|
type |
type |
Field's type |
options |
object |
Field's options: e.g. { default: false } |
Properties:
| Name | Type | Description |
|---|---|---|
name |
string |
Field's name |
type |
type |
Field's type |
options |
object |
Field's options: e.g. { default: false } |
defaultValue |
any |
returns the field's default value if it isn't undefined |
validation |
object |
returns a validation object |