Legitimate
Test:
Constructor Summary
| Public Constructor | ||
| public |
constructor(locales: *, initialState: *) |
|
Member Summary
| Public Members | ||
| public get |
|
|
| public get |
|
|
| public get |
|
|
Method Summary
| Public Methods | ||
| public |
Validate all |
|
| public |
setRules(prop: *, rulesToAdd: *): Legitimate Sets validation functions for given prop |
|
| public |
update(prop: *, value: *): Legitimate Updates the state by given prop and value |
|
| public |
Triggers defined rules for prop |
|
Public Constructors
public constructor(locales: *, initialState: *) source
Params:
| Name | Type | Attribute | Description |
| locales | * | {object} [param=defaultLocales] |
|
| initialState | * | {object} [initialState={}] |
Public Members
Public Methods
public setRules(prop: *, rulesToAdd: *): Legitimate source
Sets validation functions for given prop
Params:
| Name | Type | Attribute | Description |
| prop | * | ||
| rulesToAdd | * |
Test:
public update(prop: *, value: *): Legitimate source
Updates the state by given prop and value
Params:
| Name | Type | Attribute | Description |
| prop | * | {string} |
|
| value | * | {*} |