Webform multistep form previous button asks to fill the required fields I'm working on a D8 project and I have a multistep webform. Everything works fine but when I click the previous button I'm getting errors that the required fields shouldn't be null in order to go to the previous step. Is this a configuration I need to change or is there a way to avoid it?

Thanks in advance.
For exactly this purpose the form has the #limit_validation_errors attribute. It is an array of values that will be validated instead of the whole form.

So to go back this woul mean an empty array since you do not want to valdiate anything.

But a small issue is that with empty array you will not be able to detect the button that submitted the form so you have to always include it in the list. If you have custom button #name use that, if not then use op which is the default.

Also these are the #parents values, not #array_parents so if you have a tree form you have to take that into account. Also using this will not only limit the validation, it will actually strip the submitted values, so if you want to go back but save some information(textfield) from the form, you have to include it as well.

For example:

$form['actions']['back'] = [
  '#type' =&gt; 'submit',
  '#value' =&gt; $this-&gt;t('Back'),
  '#submit' =&gt; ['::goBackSubmit'],
  '#limit_validation_errors' =&gt; [['op']]
];


or:

$form['actions']['back'] = [
  '#type' =&gt; 'submit',
  '#name' =&gt; 'go_back_submit',
  '#value' =&gt; $this-&gt;t('Back'),
  '#submit' =&gt; ['::goBackSubmit'],
  '#limit_validation_errors' =&gt; [['go_back_submit']]
];


or:

$form['#tree'] = TRUE;
$form['actions']['back'] = [
  '#type' =&gt; 'submit',
  '#name' =&gt; 'go_back_submit',
  '#value' =&gt; $this-&gt;t('Back'),
  '#submit' =&gt; ['::goBackSubmit'],
  '#limit_validation_errors' =&gt; [['actions', 'go_back_submit']]
];