Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add the current row's information in the onGetErrorMessage callback #92
Expected / Desired Behavior / Question
When using the onGetErrorMessage callback on a text field, it would be great to have a second parameter currentRow: any in the callback in order to give the user the possibility to do some validations based on the other fields of the current row.
For example, if I have the columns Home Phone and Cell Phone and I want to do some custom validation on the Cell Phone column, like allow empty values only is Home Phone is provided.
So instead of having the following callback :
We would have something like this :
onGetErrorMessage(value: any, currentRow: any)
added a commit
Sep 6, 2018
I pushed a change for this to support this. The callback provides you with the current value you are editing, index of the row and the item itself with all its properties.
Here is an example of a new item:
Here is an example of a stored item:
If you want, you can already test out the latest 1.10.0 beta: https://sharepoint.github.io/sp-dev-fx-property-controls/beta/