Text box validating event

Add the following code to the Home Controller class.

The Home Controller class contains two versions of the Index() action method.

At this stage, the User Profile Metadata class is just an independent class in your project.The [Required] attribute indicates that a property value must be provided.The [String Length] attribute is used to specify the maximum length and optionally the minimum length for a property value.Recently i have posted how to validate email address in javascript, how to validate mobile number and email address in jquery and not i will show you how to validate mobile number using simple javascript or using regular expression in javascript.below is the code for validating mobile number with enter only numeric, length must be 10 digits and restrict user to entering illegal characters.

Search for text box validating event:

text box validating event-15text box validating event-57text box validating event-8

The [Metadata Type] attribute accepts the type of the class that is supplying metadata information to the User Profile class (User Profile Metadata in this case).

Leave a Reply

Your email address will not be published. Required fields are marked *

One thought on “text box validating event”