required fields missing message when saving

I have a couple of fields that are marked as required on both Skuid and Salesforce. The wizard allows me to go through all of the steps, including the last step which saves the object without requiring the required fields. If I add a save action to the first step, that forces the required fields but that same save action does not work on other steps. I am using API v2 on 12.4.14

It looks like I need to make a change in order for the required field message to appear. For example, if I have two required fields out of 10 non required fields on step 3 and do not make any changes… it allows me to proceed to the next step without filling out the two required fields.

Hi Eva,

To be clear, required fields will only be evaluated upon saving the model. If you have a step that does not have an action to save the specific model, the required field will not be evaluated. It is strange the validation works upon save in the first step, but not the subsequent ones.

Have you checked for any unintended model actions or other rogue actions that might be applying/updating a value on this field?

Are you by chance saving the model as soon as the page loads? This is a rare use case but if so, the save may be taking place before the component is loaded, which triggers the validation. Skuid will only evaluate fields that have unsaved changes so if you are saving the model on page load (before the component loads), you can try adding an action to update the field to blank right after saving. This would cause the field to be in an “unsaved” state and would trigger the validation.

If you have a simple page showing this problem, you might share the XML here to get extra eyes on it.

I just resolved a similar error. Fields in a V2 Form component were copied and edited in XML. Custom field names were edited, but uniqueId attributes were left duplicated.

For example:
[tag]skuid__field id=“City__c” uniqueId=“sk-3fSr-51465” required=“true”[/tag] was duplicated as:
[tag]skuid__field id=“State__c” uniqueId=“sk-3fSr-51465” required=“true”[/tag]

I did not verify, but it seems that if City was entered, but not State, the Form was satisfied that required fields were populated. The solution was to change the uniqueId on State__c to “sk-3fSr-51466”

Hi Mike, thank you for your feedback. I wanted to close the loop here, I can reproduce the behaviour. Sounds like the reason are the identical field ids, like you said. It makes sense: If the ids are identical, they look like the same field, hence it’s enough to fill out one of them. The issue seems to occur only if you manipulate the XML. As the XML states, the ids should be unique :slight_smile: I can’t reproduce any issue if I add fields in the App Composer, they all have unique ids. Please let me know in case you run into this issue while using the App composer (not editing the XML). Regards, Luzie