Class ValidUrlAttribute
Use this attribute to validate url property.
Inheritance
System.Object
    ValidUrlAttribute
  Namespace: EPiServer.Commerce.Catalog.DataAnnotations
Assembly: EPiServer.Business.Commerce.dll
Version: 10.8.0Syntax
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = true)]
public class ValidUrlAttribute : ValidationAttribute
  Constructors
ValidUrlAttribute()
Initializes a new instance of a ValidUrlAttribute using the default registered EPiServer.Framework.Localization.LocalizationService and EPiServer.Web.UrlSegmentOptions.
Declaration
public ValidUrlAttribute()
  ValidUrlAttribute(LocalizationService, UrlSegmentOptions)
Initializes a new instance of a ValidUrlAttribute.
Declaration
public ValidUrlAttribute(LocalizationService localizationService, UrlSegmentOptions urlSegmentOptions)
  Parameters
| Type | Name | Description | 
|---|---|---|
| EPiServer.Framework.Localization.LocalizationService | localizationService | Service for translating the validation error message.  | 
      
| EPiServer.Web.UrlSegmentOptions | urlSegmentOptions | The url segment options.  | 
      
Methods
IsValid(Object)
Determines whether the specified value of the object is valid.
Declaration
public override bool IsValid(object value)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Object | value | The value of the object to validate.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Boolean | true if the specified value is valid; otherwise, false.  |