Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make row number available in validator #768

Open
1 of 2 tasks
adamreisnz opened this issue Jan 17, 2022 · 0 comments
Open
1 of 2 tasks

Make row number available in validator #768

adamreisnz opened this issue Jan 17, 2022 · 0 comments
Assignees

Comments

@adamreisnz
Copy link

adamreisnz commented Jan 17, 2022

Parsing or Formatting?

  • Formatting
  • Parsing

Is your feature request related to a problem? Please describe.
We'd like to have the row number available in the validate callback, as it would be useful to generate meaningful error messages for the user.

Moreover, it would allow us to construct non-fatal errors with reference to the row number, without failing the entire row.

Describe the solution you'd like
Make the row number available as a parameter in the validate callback.

Describe alternatives you've considered
I am aware that the row number is available in the data-invalid event, but then there is no way to discriminate whether we want to append it to an error message or not. This logic lives in the validate callback, and for some validation errors we want to append the row number, because there is no other way to identify an item (for example if the name column is empty), whereas in others we don't need the row number.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants