Validating data javascript

13-Apr-2020 17:32

Preventing bad form information is a deadly game of cat and also cat.

From all the examples above we see how to validate the form data using Java Script.

If you want to use the validators with the classes generated by the Entity Framework then you need to create meta data classes.

You apply the validators to the meta data class instead of applying the validators to the actual class.

For example, imagine that you have created a Movie class using the Entity Framework (see Figure 5).

Imagine, furthermore, that you want to make the Movie Title and Director properties required properties. Therefore, there is no way to apply the validator attributes to the properties of the Movie class defined in the Data Model.The Movie Meta Data class contains proxy properties for the properties of the Movie class.