webdav portal password change page added
This commit is contained in:
parent
dd15673752
commit
4bae47e17f
35 changed files with 2010 additions and 93 deletions
|
@ -0,0 +1,21 @@
|
|||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace WebsitePanel.WebDavPortal.CustomAttributes
|
||||
{
|
||||
public class PhoneNumberAttribute : RegularExpressionAttribute, IClientValidatable
|
||||
{
|
||||
public const string PhonePattern = @"^\+?(\d[\d-. ]+)?(\([\d-. ]+\))?[\d-. ]+\d$";
|
||||
|
||||
public PhoneNumberAttribute()
|
||||
: base(PhonePattern)
|
||||
{
|
||||
}
|
||||
|
||||
public IEnumerable<ModelClientValidationRule> GetClientValidationRules(ModelMetadata metadata, ControllerContext context)
|
||||
{
|
||||
yield return new ModelClientValidationRegexRule(FormatErrorMessage(metadata.GetDisplayName()), Pattern);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue