Skip to content

Commit d4647c9

Browse files
authored
Merge pull request #103 from systopia/pre-validation-callbacks-only-on-actual-validation
Execute pre schema validation callbacks only if schema validation is performed
2 parents b386af1 + 40bc63f commit d4647c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Form/AbstractJsonFormsForm.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,9 @@ protected function buildJsonFormsForm(
154154
*/
155155
public function validateForm(array &$form, FormStateInterface $formState): void {
156156
parent::validateForm($form, $formState);
157-
FormCallbackExecutor::executePreSchemaValidationCallbacks($formState);
158157

159158
if ($formState->isSubmitted() || $formState->isValidationEnforced()) {
159+
FormCallbackExecutor::executePreSchemaValidationCallbacks($formState);
160160
if (TRUE === $formState->get('$limitValidationUsed')) {
161161
// We cannot use Drupal validation errors if the form uses limited
162162
// validation. They might contain errors that with the submitted data

0 commit comments

Comments
 (0)