Ejemplo n.º 1
0
 protected override string AddInputControlAttributes()
 {
     if (VCollection != null && Accessibility.Write)
     {
         return(VCollection.GetAttributes());
     }
     return("");
 }
Ejemplo n.º 2
0
        public void UseValidation(IValidationCollection coll, string fieldName = null, string alternateLabel = null, string rowIndex = null)
        {
            VCollection = coll;
            if (VCollection == null)
            {
                VCollection = new ValidationCollection(Helper.GetFormName());
            }
            string defName = InputModel.NgFormName + "__" + MemberName?.Replace(".", "_");

            fieldName = (fieldName ?? defName) + (rowIndex == null ? "" : $"'+{rowIndex}+'");
            VCollection.SetMember(ColumnId, fieldName, alternateLabel);

            ColumnModel.IsRequired         = VCollection.HasRequired();
            ColumnModel.ValidationMessages = GetCellErrors(VCollection);
        }
Ejemplo n.º 3
0
        public void UseValidation(IValidationCollection coll, string fieldName = null, string alternateLabel = null)
        {
            VCollection = coll;
            if (VCollection == null)
            {
                VCollection = new ValidationCollection(Helper.GetFormName());
            }

            VCollection.SetMember(ColumnId, fieldName ?? InputModel.FieldName, alternateLabel);

            GroupModel.IsRequired = VCollection.HasRequired();
            if (GroupModel.IsRequired)
            {
                GroupModel.RequiredCondition = VCollection.GetRequiredCondition();
            }
            GroupModel.ValidationMessages = VCollection.GetMessages(Helper);
        }