0
때문이다. 하지만 그것을 찾을 수없는 것 같아요?내가 지정 유효성 검사에 전달 된 <code>ErrorMessage</code> 문자열을 읽을 수 있기를 원하는 그래서 그것을에 보내고 일부 <code>string.Format()</code>을 할 수있는 속성
[IsDateBeforeFixedDate(4, 0, 0, ErrorMessage = "*The departure date should be between 4 days and 11 months")]
로 decalred :
그래서 예를 들어 나는 사용자 정의 속성이
public sealed class IsDateBeforeFixedDateAttribute : ValidationAttribute, IClientValidatable
{
public IsDateBeforeFixedDateAttribute(int days, int months, int years) : base(days, months, years)
{
//I want to read the ErrorMessage string here! (i.e. "*The departure date should be between 4 days and 11 months")
}
}
ErrorMessageString
는 포함되어 있지 않습니다 또는 ErrorMessage