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

Allow to get error message for particular input(s) #61

Closed
6 tasks done
NYPD opened this issue Mar 3, 2017 · 5 comments
Closed
6 tasks done

Allow to get error message for particular input(s) #61

NYPD opened this issue Mar 3, 2017 · 5 comments
Assignees
Milestone

Comments

@NYPD
Copy link
Owner

NYPD commented Mar 3, 2017

Or maybe some sort of functionality to display error messages somewhere else.

  • initialize() should take a errorCallback function
  • validate() should take a temp errorCallback function
  • showErrorMessages() should take a temp errorCallback function maybe?
  • getErrorMessage()
  • getErrorMessages()
  • getErrorMessagesAsMap()
@NYPD NYPD added this to the v1.1.2 milestone Mar 3, 2017
@NYPD NYPD self-assigned this Mar 3, 2017
@NYPD NYPD modified the milestones: v1.1.2, v1.2.0 Mar 3, 2017
@NYPD
Copy link
Owner Author

NYPD commented Mar 8, 2017

I think this is a two parter.

  • Function that returns a map of input name to error message (or something like that).
  • Overloaded method for validate() and showErrorMessages() that takes in a function which is used to display error messages somewhere else

@NYPD
Copy link
Owner Author

NYPD commented Mar 8, 2017

And a third

  • Additional configuration during initialization that takes in a function

@NYPD
Copy link
Owner Author

NYPD commented Apr 7, 2017

Perhaps error messages should just take a generic function to deal with error messages in general

@NYPD
Copy link
Owner Author

NYPD commented Apr 27, 2017

The error callback function will be called on each element validated, it will be supplied the element itself and the error message regardless if it is valid or not. If it is valid, error message will be null.

This change was added in 777f929

@NYPD
Copy link
Owner Author

NYPD commented Apr 28, 2017

errorCallback should be renamed messageCallback

NYPD added a commit that referenced this issue Apr 28, 2017
@NYPD NYPD closed this as completed Apr 28, 2017
@NYPD NYPD mentioned this issue Apr 28, 2017
12 tasks
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

1 participant