VahidN/DNTPersianUtils.Core

How to ignore validation data annotations if empty

mohammad68a opened this issue · 1 comments

I have an issue when i define validation like this

[Display(Name = "شماره همراه سرپرست")]
 [ValidIranianMobileNumber(ErrorMessage = "{0} وارد شده صحیح نمی باشد!")]
public string SupervisorPhoneNumber { get; set; }

this property is not required and I want when user entered anything, this validator start to work and otherwise ignore to check.

Fixed it via #95f516e