Client side input validation.
-------

**Description:**

As web applications become more advanced, an increasing amount of HTML is generated by 
JavaScript on the client-side rather than by the server. Any time content needs to be 
changed without refreshing the entire page, the update must be performed using JavaScript.
Most notably, this is the case when a page is updated after an AJAX request.

XSS vulnerabilities can be present not only in your website's server-side code, but also 
in your website's client-side JavaScript code. Consequently, even with completely 
secure server-side code, the client-side code might still unsafely include user input in a 
DOM update after the page has loaded. If this happens, the client-side code has enabled 
an XSS attack through no fault of the server-side code.


**Solution:**

First there must be a client side input validation method as you would apply to the server
side. This means you should also apply input rejection as wel as typecasting and such.
This is to prevent users from being attacked by XSS attacks which are undetectable by
the server.

Recommended knowledge base items:

- Positive validation method
- Single input validation controls
- Input rejection
- Input validation




   
