@@ -577,28 +577,8 @@ export const GcpInputVarFields = ({
577577 } ;
578578
579579 const organizationIdFields = getFieldById ( 'gcp.organization_id' ) ;
580- const organizationIdValueInvalid = fieldIsInvalid (
581- organizationIdFields ?. value ,
582- hasInvalidRequiredVars
583- ) ;
584- const organizationIdError = i18n . translate (
585- 'xpack.csp.cspmIntegration.integration.fieldRequired' ,
586- {
587- defaultMessage : '{field} is required' ,
588- values : {
589- field : organizationIdFields ?. label ,
590- } ,
591- }
592- ) ;
593580
594581 const projectIdFields = getFieldById ( 'gcp.project_id' ) ;
595- const projectIdValueInvalid = fieldIsInvalid ( projectIdFields ?. value , hasInvalidRequiredVars ) ;
596- const projectIdError = i18n . translate ( 'xpack.csp.cspmIntegration.integration.fieldRequired' , {
597- defaultMessage : '{field} is required' ,
598- values : {
599- field : projectIdFields ?. label ,
600- } ,
601- } ) ;
602582
603583 const credentialsTypeFields = getFieldById ( 'gcp.credentials.type' ) ;
604584
@@ -644,38 +624,26 @@ export const GcpInputVarFields = ({
644624 < div >
645625 < EuiForm component = "form" >
646626 { organizationIdFields && isOrganization && (
647- < EuiFormRow
648- fullWidth
649- label = { gcpField . fields [ 'gcp.organization_id' ] . label }
650- isInvalid = { organizationIdValueInvalid }
651- error = { organizationIdValueInvalid ? organizationIdError : undefined }
652- >
627+ < EuiFormRow fullWidth label = { gcpField . fields [ 'gcp.organization_id' ] . label } >
653628 < EuiFieldText
654629 disabled = { disabled }
655630 data-test-subj = { CIS_GCP_INPUT_FIELDS_TEST_SUBJECTS . ORGANIZATION_ID }
656631 id = { organizationIdFields . id }
657632 fullWidth
658633 value = { organizationIdFields . value || '' }
659634 onChange = { ( event ) => onChange ( organizationIdFields . id , event . target . value ) }
660- isInvalid = { organizationIdValueInvalid }
661635 />
662636 </ EuiFormRow >
663637 ) }
664638 { projectIdFields && (
665- < EuiFormRow
666- fullWidth
667- label = { gcpField . fields [ 'gcp.project_id' ] . label }
668- isInvalid = { projectIdValueInvalid }
669- error = { projectIdValueInvalid ? projectIdError : undefined }
670- >
639+ < EuiFormRow fullWidth label = { gcpField . fields [ 'gcp.project_id' ] . label } >
671640 < EuiFieldText
672641 disabled = { disabled }
673642 data-test-subj = { CIS_GCP_INPUT_FIELDS_TEST_SUBJECTS . PROJECT_ID }
674643 id = { projectIdFields . id }
675644 fullWidth
676645 value = { projectIdFields . value || '' }
677646 onChange = { ( event ) => onChange ( projectIdFields . id , event . target . value ) }
678- isInvalid = { projectIdValueInvalid }
679647 />
680648 </ EuiFormRow >
681649 ) }
@@ -743,8 +711,6 @@ export const GcpInputVarFields = ({
743711 onChange = { ( value ) => {
744712 onChange ( credentialJSONFields . id , value ) ;
745713 } }
746- errors = { credentialJSONFieldsInvalid ? [ credentialJSONError ] : [ ] }
747- forceShowErrors = { false }
748714 isEditPage = { isEditPage }
749715 />
750716 </ Suspense >
0 commit comments