Default .invalid returns false on page load for required fields/inputs

Goal
Create conditional logic to disable forms, buttons, or other objects using the 'Required' validation of other components (specifically, text inputs or select drop-downs).

Steps
I added components to the app and set all components as required. I created one variable to check with .invalid and it is not functioning as (I would have) expected. On page load, the .invalid returns 'false' when the value is empty.

Details
I would have expected a Required field to be invalid on page load. This means I cannot use .invalid to disable the Next button. I have to do a longer (and more likely to break) workaround of .selectedIndex === null and value.length.

Is this expected operation? To me, this is a bug, or at minimum, a misalignment on 'Required' validation. Maybe I'm just crazy. What's the best way to go about this?

Note; the true and false text boxes under the signature box, between Previous and Next, show the value of each variable. varFormDisabled on the left, varFormDisabledv2 on the right.

Screenshots:

shows 'true' on load
image

shows 'false' on load
image

1 Like

Thanks for flagging this bug! I'll reach out when our team is able to prioritize a fix

1 Like

Hi, it’s still not fixed as of September 23. My form state shows that 'invalid' is false, even though the required fields are empty.

Do you have an ETA for this bugfix? On page load there is no programatic way to determine if a form is valid or not.

Agree, this is a very annoying bug, which makes form validation more complex. I'm running selfhosted 3.75.6

Hi all! Thanks for your input. I don't have any concrete update here, unfortunately. The relevant fix is ready for work but hasn't been added to a particular development cycle just yet. I've bumped a couple internal conversations to reflect your recent interest in getting this fixed and will provide an update here when I can!

This issue is still not resolved, it was causing invalid api invocations for my application. This was a really annoying issue to debug.

Current workaround: Running the same validation code before the invocation to make sure the app performs as expected.

1 Like

Hey @Jaison_Thomas - thanks for reaching out. You're right that the underlying issue hasn't yet been fixed and, unfortunately, it's not currently clear when it will be prioritized. I've given the internal ticket a bump and will keep an eye out for any movement. :+1:

I'm glad that manually re-running the same validations prior to triggering your query is a functional workaround, for the time being!

1 Like

Hi, would it be possible to get this prioritized more? this has caused us issues and debugging it has been painful.

1 Like

Let me see what I can do, @Shihab_Humayoon! Welcome to the community. :slightly_smiling_face:

1 Like

Hi @Darren , do you have any news about this issue? Thanks!

Hi @Marcus_Santos,

It looks like there are no updates at this time.

I did add a +1 to the ticket for you and also found that there should be progress on this soon as it looks like the ticket has gained some serious weight recently.

Will post with any updates I hear on this :+1:

+1 from me, very annoying and run into this multiple times per week

no updates still? this is a really painful bug

Hi @Rachael,

Unfortunately no update. I can add a +1 for you to the ticket and check with the engineering team on getting this prioritized.

This is an extremely painful and prominent bug. Please prioritize this.

Will relay this to the engineers and add your +1s to the tickets @michaelyork :+1: