public static string GetValidationErrorMessage(ValidationModelException error, string cultureName = null) { if (error.ValidatorType == typeof(RequiredValidator)) { return(string.Format(Instance.GetString("ErrMandatoryFieldRequired"), EidssFields.Get(error.PropertyName, null))); } return(Instance.GetString(error.MessageId, error.MessageId, cultureName)); }
public bool OnValidationEnd(ValidationModelException ex) { if (ValidationEnd != null) { var args = new ValidationEventArgs(ex.MessageId, ex.FieldName, ex.PropertyName, ex.Pars, ex.ValidatorType, ex.Obj, ex.ValidationType); ValidationEnd(this, args); return args.Continue; } return false; }
protected bool ChainsValidate(FFTemplateLookup obj, bool bRethrowException) { ValidationModelException ex = ChainsValidate(obj); if (ex != null) { if (bRethrowException) throw ex; if (!obj.OnValidation(ex)) { obj.OnValidationEnd(ex); return false; } } return true; }
protected bool ChainsValidate(HACodeLookup obj, bool bRethrowException) { ValidationModelException ex = ChainsValidate(obj); if (ex != null) { if (bRethrowException) { throw ex; } if (!obj.OnValidation(ex)) { obj.OnValidationEnd(ex); return(false); } } return(true); }
protected bool ChainsValidate(VetAggregateActionDetailed obj, bool bRethrowException) { ValidationModelException ex = ChainsValidate(obj); if (ex != null) { if (bRethrowException) { throw ex; } if (!obj.OnValidation(ex)) { obj.OnValidationEnd(ex); return(false); } } return(true); }
protected bool ChainsValidate(SmphGisBaseReferenceTranslationLookup obj, bool bRethrowException) { ValidationModelException ex = ChainsValidate(obj); if (ex != null) { if (bRethrowException) { throw ex; } if (!obj.OnValidation(ex)) { obj.OnValidationEnd(ex); return(false); } } return(true); }