Methods
from(data, attrs, params) → {Changeset}
Creates changeset wrapped in fluent validation object.
You can use every validator against wrapped changeset.
Parameters:
Name | Type | Description |
---|---|---|
data |
Object | entity model data |
attrs |
Object | changes |
params |
Array | changes to pick |
Properties:
Name | Type | Description |
---|---|---|
changeset |
object | current changeset |
Returns:
- Type
- Changeset
Example
from({id: 1, title: 'title'}, {title: 'new title', body: 'body'}, ['title', 'body'])