Skip to content

Changed "On Error" and "On Reset Error" callback functions.#708

Open
anandphulwani wants to merge 3 commits into
autoNumeric:nextfrom
anandphulwani:error-and-reset-callback-fns
Open

Changed "On Error" and "On Reset Error" callback functions.#708
anandphulwani wants to merge 3 commits into
autoNumeric:nextfrom
anandphulwani:error-and-reset-callback-fns

Conversation

@anandphulwani
Copy link
Copy Markdown

@anandphulwani anandphulwani commented Jan 12, 2021

Some error messages which relate to user input should be displayed to the user's in his User Interface, those can be displayed by callback functions on the error occurrence ( for e.g. entering of characters or bypassing mix/max limits ), those can be done by using the callback functions as follows.

new AutoNumeric("#element_id",{
          onErrorCallback: message => { displayErrorMsg(message) },
          onResetErrorCallback: () => { resetErorrMsg() },
});

P.S. I had to delete the previous pull request because the earlier code + pull request was failing on eslint rules, and build was failing on that, i have corrected code accordingly, and now the build succeeds properly.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant