Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | 9x | import * as Yup from "yup";
import { VALIDATION_MESSAGES } from "@validation/messages";
import { createStreetAddressValidator } from "@validation/address/streetValidator";
import { buildZipSchema } from "@validation/address/zipValidator";
import { createStateValidator } from "@validation/address/stateValidator";
import { createCityValidation } from "@validation/address/cityValidator";
import { createCountryValidator } from "@validation/address/countryValidator";
export const businessAddressSchema = Yup.object().shape({
country: createCountryValidator({
required: true,
nullable: false,
message: VALIDATION_MESSAGES.REQUIRED,
}),
address: createStreetAddressValidator({
required: true,
requiredMessage: VALIDATION_MESSAGES.REQUIRED,
}),
city: createCityValidation({
required: true,
customRequiredMessage: VALIDATION_MESSAGES.REQUIRED,
}),
state: createStateValidator({
required: true,
requiredMessage: VALIDATION_MESSAGES.REQUIRED,
}),
zip: buildZipSchema({
required: true,
allowNull: false,
message: VALIDATION_MESSAGES.REQUIRED,
}),
});
|