Javatpoint Logo
Javatpoint Logo

Backbone.js model.validationError ()

The Backbone.js validationError model returns values by using validate() method. It displays validation error in two cases :

  1. In the case of failure of validation.
  2. When an invalid event is triggered.

Syntax:

Let's take an example.

See this example:

Test it Now

Output:

Save the above code in validationerror.html file and open this file in a new browser.

BackboneJS validationError Model

Note: In the above example you can see that we have set a different "age" for validation. So, it gives a validation error message.






Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA