• Not Answered

Sitecore Experience Forms Custom Server side validation fires for hidden/invisible field

I am developing custom fields and validations for Sitecore Forms. The client-side scripting is treating hidden/invisible controls correctly by ignoring it. But its the server side code thats evaluating the hidden/invisible fields and not submitting the data successfully. Can someone please advise what I need to do in order to fix this?
Thanks in advance

Here is how the code looks like:

 

public class IsRequiredValidation : ValidationElement<string>
{

    public IsRequiredValidation(ValidationDataModel validationItem) : base(validationItem)
    {
    }


    public override IEnumerable<ModelClientValidationRule> ClientValidationRules
    {
        get
        {
        }
    }


    public override ValidationResult Validate(object value)
    {
        if (IsInputEntered(value))
        {
            return ValidationResult.Success;
        }

        return new ValidationResult(FormatMessage(Title));

    }

    public override void Initialize(object validationModel)
    {
    }

    private bool IsInputEntered(object value)
    {
    }



}