import type { IContextualValidator , IStage } from '@spinnaker/core' ; import { FormValidator } from '@spinnaker/core' ; export const validate = ( stage ) => { const formValidator = new FormValidator ( stage ) ; formValidator . field ( 'credentials' , 'Account' ) . required ( ) ; formValidator . field ( 'regions' , 'Regions' ) . required ( ) ; formValidator . field ( 'cluster' , 'Cluster' ) . required ( ) ; return formValidator . validateForm ( ) ; } ;