- enabled codice fiscale always;
- updated cf validation;
This commit is contained in:
@@ -19,7 +19,7 @@ import BlockingOverlay from '../../components/BlockingOverlay';
|
||||
import CompanyService from '../../service/company-service';
|
||||
|
||||
// tools
|
||||
import { isPIVA, isEmail, isEmailPEC } from '../../helpers/validators';
|
||||
import { isPIVA, isEmail, isEmailPEC, isCodiceFiscale } from '../../helpers/validators';
|
||||
import set404FromErrorResponse from '../../helpers/set404FromErrorResponse';
|
||||
|
||||
//const APP_EVALUATION_FLOW_ID = process.env.REACT_APP_EVALUATION_FLOW_ID;
|
||||
@@ -218,12 +218,16 @@ const AddCompany = () => {
|
||||
|
||||
<FormField
|
||||
type="textinput"
|
||||
disabled
|
||||
fieldName="codiceFiscale"
|
||||
label={__('Codice fiscale', 'gepafin')}
|
||||
control={control}
|
||||
errors={errors}
|
||||
config={{ required: __('È obbligatorio', 'gepafin') }}
|
||||
config={{
|
||||
required: __('È obbligatorio', 'gepafin'),
|
||||
validate: {
|
||||
validCF: (value) => isCodiceFiscale(value) || isPIVA(value)
|
||||
}
|
||||
}}
|
||||
/>
|
||||
{/*{APP_EVALUATION_FLOW_ID === '1'
|
||||
? <FormField
|
||||
|
||||
Reference in New Issue
Block a user