/// <summary> /// This method validates the name of this <see cref="MarkupItem"/> based on the following rules: /// (1) Name must not be empty of null; /// (2) Optionally check to ensure the name is FRTA compliant; /// Determines if the given name is FRTA compliant; /// A name must start with an alphabetic character /// A name must not contain spaces /// A name must not contain special characters /// A name must not exceed 256 chars /// </summary> /// <param name="markupType">Markup type code (XBRL or internal).</param> /// <param name="errorMessages">Validation messages.</param> /// <param name="CheckFRTA">Flag to indicate if the system should check to ensure the name is FRTA compliant</param> /// <returns>Returns true, if the name is valid.</returns> public virtual bool IsValid(MarkupTypeCode markupType, out ArrayList errorMessages, bool CheckFRTA) { errorMessages = new ArrayList(); if (Name == null || Name == string.Empty) { errorMessages.Add(StringResourceUtility.GetString("Common.Error.InvalidName")); return(false); } if (CheckFRTA) { if (!Aucent.MAX.AXE.Common.Utilities.StringUtility.IsNameFRTAValid(this.Name)) { errorMessages.Add( String.Format(StringResourceUtility.GetString("Client.UserControl.TreeNodeRename.FRTACompliance"), this.Name)); errorMessages.Add(String.Format(StringResourceUtility.GetString("Common.Error.InvalidFRTAName"), Aucent.MAX.AXE.Common.Utilities.StringUtility.InvalidString)); return(false); } } return(true); }
/// <summary> /// This method validates the name of this <see cref="MarkupItem"/> based on the following rules: /// (1) Name must not be empty of null; /// (2) Optionally check to ensure the name is FRTA compliant; /// Determines if the given name is FRTA compliant; /// A name must start with an alphabetic character /// A name must not contain spaces /// A name must not contain special characters /// A name must not exceed 256 chars /// </summary> /// <param name="markupType">Markup type code (XBRL or internal).</param> /// <param name="errorMessages">Validation messages.</param> /// <param name="CheckFRTA">Flag to indicate if the system should check to ensure the name is FRTA compliant</param> /// <returns>Returns true, if the name is valid.</returns> public virtual bool IsValid( MarkupTypeCode markupType, out ArrayList errorMessages, bool CheckFRTA) { errorMessages = new ArrayList(); if ( Name == null || Name == string.Empty ) { errorMessages.Add( StringResourceUtility.GetString("Common.Error.InvalidName") ); return false; } if (CheckFRTA) { if (!Aucent.MAX.AXE.Common.Utilities.StringUtility.IsNameFRTAValid(this.Name)) { errorMessages.Add( String.Format(StringResourceUtility.GetString("Client.UserControl.TreeNodeRename.FRTACompliance"), this.Name)); errorMessages.Add( String.Format(StringResourceUtility.GetString("Common.Error.InvalidFRTAName"), Aucent.MAX.AXE.Common.Utilities.StringUtility.InvalidString)); return false; } } return true; }