We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fe3756f commit 128f411Copy full SHA for 128f411
ui/js/dfv/src/pods-dfv.js
@@ -611,8 +611,25 @@ window.PodsDFV = {
611
* @return {string[]} Array of validation messages
612
*/
613
checkValidation( pod, itemId, formCounter ) {
614
- const messages = [];
615
- return messages;
+ const storeKey = createStoreKey(
+ pod,
616
+ itemId,
617
+ formCounter,
618
+ STORE_KEY_DFV
619
+ );
620
+
621
+ const stored = select( storeKey );
622
623
+ // Store not found.
624
+ if ( ! stored ) {
625
+ return undefined;
626
+ }
627
+ //dispatch toggleNeedsValidating
628
+ dispatch( storeKey ).toggleNeedsValidating();
629
+ //select getValidationMessages
630
+ const validationMessages = select( storeKey ).getValidationMessages();
631
+ console.log( { validationMessages } );
632
+ return validationMessages;
633
},
634
635
/**
0 commit comments