Enhance model.validate with viewName
dzhitomirsky-sc opened this issue · comments
Intro
Now model.validate
takes the only parameter 'instance':
model: {
...
validate: instance => {
}
}
In certain cases it is needed to know from which validation is called (e.g. validating PK unique key).
ToDo
So, please extend validation function with the next api:
model: {
validate: ({instance, viewName}) => {
}
}
Relevant Mocha tests still need correction. They are describe.skip
-ed now.
This was merged into #230 with fixed tests.
Change the function arguments to
model: {
validate: ({persistentInstance, formInstance, viewName}) => {
...
}
}