Skip to content

Commit

Permalink
feat: fixed issue with Citizen field
Browse files Browse the repository at this point in the history
  • Loading branch information
likhith-deriv committed Jun 2, 2023
1 parent fee8c2e commit 380bc75
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -293,19 +293,19 @@ export const PersonalDetailsForm = ({
if (is_virtual) return errors;

const required_fields = ['first_name', 'last_name', 'phone', 'address_line_1', 'address_city'];
if (is_eu) {
required_fields.push('citizen');
}

if (is_mf) {
const required_tax_fields = ['tax_residence', 'tax_identification_number', 'employment_status'];
required_fields.push(...required_tax_fields);
}

validateValues(val => val, required_fields, localize('This field is required'));

const residence_fields = ['citizen'];
const validateResidence = val => getLocation(residence_list, val, 'value');
validateValues(validateResidence, residence_fields, true);
if (is_eu) {
const residence_fields = ['citizen'];
const validateResidence = val => getLocation(residence_list, val, 'value');
validateValues(validateResidence, residence_fields, true);
}

const min_tax_identification_number = 0;
const max_tax_identification_number = 25;
Expand Down

0 comments on commit 380bc75

Please sign in to comment.