diff --git a/ui/js/dfv/src/pods-dfv.js b/ui/js/dfv/src/pods-dfv.js index 4e3870cf0a..fe44ff3bf2 100755 --- a/ui/js/dfv/src/pods-dfv.js +++ b/ui/js/dfv/src/pods-dfv.js @@ -611,8 +611,25 @@ window.PodsDFV = { * @return {string[]} Array of validation messages */ checkValidation( pod, itemId, formCounter ) { - const messages = []; - return messages; + const storeKey = createStoreKey( + pod, + itemId, + formCounter, + STORE_KEY_DFV + ); + + const stored = select( storeKey ); + + // Store not found. + if ( ! stored ) { + return undefined; + } + //dispatch toggleNeedsValidating + dispatch( storeKey ).toggleNeedsValidating(); + //select getValidationMessages + const validationMessages = select( storeKey ).getValidationMessages(); + console.log( { validationMessages } ); + return validationMessages; }, /**