I have created the following page validator:
public class MyValidator : IValidate
public IEnumerable Validate(MyPage instance)
yield return new ValidationError
ErrorMessage = "My message",
PropertyName = "MyProperty",
Severity = ValidationErrorSeverity.Error,
ValidationType = ValidationErrorType.Unspecified
Everything works fine, I cannot publish the page, I get "My message" in validation summary, etc.But how can I mark MyProperty as invalid (red border and error message next to it)?
Do I have to use a custom attribute on top of MyProperty?
As far as I know the IValidate interface does server side validation only - so no red border