Client verification the above only describes the custom verification of the client, so that user input is not reliable enough, users can bypass our defined client verification. Therefore, client-only verification is not enough. We need to perform another verification on the server. ValidationAttribute server verification must inherit from ValidationAttribute and override the IsValid virtual method to customize its own verification rules. The ValidationAttribute declaration is roughly as follows: attribute {// message displayed when verification fails: public virtual string FormatErrorMessage (string name); // custom verification: protected virtual ValidationResult IsValid (object value, ValidationContext validationContext ); // custom verification 2 public virtual bool IsValid (object value);} UrlAttributeUrlAttrib Ute is used to verify the validity of the Url format. This feature has been implemented in NET Framework 4.5. Let's take an example. Public class Link {[Required] [DisplayName ("Text")] public string Text {get; set;} [Url] [Required] [DisplayName ("Url Link")] public string Url {get; set ;}} public class UrlAttribute: ValidationAttribute, IClientValidatable {public override string FormatErrorMessage (string name) {return string. format ("{0} Format error", name);} public UrlAttribute () {} public override bool IsValid (object value) {var Text = value as string; Uri uri; return (! String. isNullOrWhiteSpace (text) & Uri. tryCreate (text, UriKind. absolute, out uri);} public IEnumerable <ModelClientValidationRule> invoke (ModelMetadata metadata, ControllerContext context) {var validationRule = new ModelClientValidationRule {ErrorMessage = FormatErrorMessage (metadata. displayName), ValidationType = "url" ,}; yield return validationRule ;}} UrlAttribute implement Verification: the client only adds the data-val-url attribute to the input control, but its client verification is still valid because the validate plug-in has implemented its js verification script.