public override bool Validate() { if (!IsChanged) { return(true); } var _isValid = !string.IsNullOrEmpty(Keyword) || (string.IsNullOrEmpty(ImageAltDescription) && string.IsNullOrEmpty(Title) && string.IsNullOrEmpty(MetaDescription)); if (_isValid) { if (!string.IsNullOrEmpty(Keyword)) { _isValid = !(Keyword.IndexOfAny(InvalidKeywordCharacters.ToCharArray()) > -1); if (!_isValid) { SetError("Keyword", string.Format(@"Keyword can't contain {0} characters".Localize(), InvalidKeywordCharacters), true); } } } else { SetError("Keyword", @"Keyword is required".Localize(), true); } if (_isValid) { ClearError("Keyword"); } return(_isValid); }