JavaScript SPA: Working With Validation

Web developers seeking an introductory guide to developing lightweight, high performance JavaScript single page applications in Visual Studio 2013


Expected Duration
93 minutes

A JavaScript single page application, or SPA, uses a combination of JavaScript libraries and web development frameworks to communicate with the server, consume and manage data, and to display application views on screen. A SPA serves up a single HTML page in which all of the application views are rendered on the client, and data that is retrieved from the server can be cached and efficiently managed on the client. In this course, you will learn how to implement custom data validation rules on the client and server, how to use Breeze validation, how to gather Breeze entity errors, how to parse Breeze entity error messages on the client, and how to display validation errors to the user in a JavaScript SPA in Visual Studio 2013.


Using Custom Validation Rules

  • start the course
  • define a custom validation rule
  • use the Breeze Validator.register() method to register custom validation rules with Breeze
  • apply a validator to entities and properties

Reporting Validation Errors

  • add data annotations such as required fields and max length
  • create a view for displaying input validation errors on text input controls
  • use the function and the entity.entityAspect.getValidationErrors() method
  • use a regular expression to parse the returned error object

Practice: Working with Validation

  • use Custom Validation Rules and Report Validation Errors





Multi-license discounts available for Annual and Monthly subscriptions.