Members
json
- Description:
Override Jsonable logic allowing only valid data to be saved
- Source:
Override Jsonable logic allowing only valid data to be saved
(static) scheme
- Description:
Class scheme
- Source:
Class scheme
Methods
validate() → {Array.<String>|undefined}
- Description:
Validate data
- Source:
Returns:
array of string errors or undefined if validation passed
- Type
- Array.<String> | undefined
(static) discriminator() → {object}
- Description:
Class schema per given data, allows schema variativity for given data (validates according to subclasses schemas using a discriminator field)
- Source:
- See:
-
- push/api/data/trigger.js
Returns:
class schema by default
- Type
- object
(static) validate(data, scheme) → {object}
- Description:
Validate data
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
data |
object | data to validate |
scheme |
object | optional scheme override |
Returns:
common.validateArgs object with replaced by class instance: {errors: [], result: true, obj: Validatable}
- Type
- object