File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -611,8 +611,25 @@ window.PodsDFV = {
611
611
* @return {string[] } Array of validation messages
612
612
*/
613
613
checkValidation ( pod , itemId , formCounter ) {
614
- const messages = [ ] ;
615
- return messages ;
614
+ const storeKey = createStoreKey (
615
+ 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 ;
616
633
} ,
617
634
618
635
/**
You can’t perform that action at this time.
0 commit comments