WIP Bill Line deduction from Labor IO-571

This commit is contained in:
Patrick Fic
2021-01-08 17:24:40 -08:00
parent baef1eaaf9
commit 12f14e5425
23 changed files with 638 additions and 93 deletions

View File

@@ -20,12 +20,16 @@ export default forwardRef(FormItemPhone);
export const PhoneItemFormatterValidation = (getFieldValue, name) => ({
async validator(rule, value) {
const p = phone(getFieldValue(name), "us");
const p2 = phone(getFieldValue(name), "ca");
if (p.length > 0 || p2.length > 0) {
if (!getFieldValue(name)) {
return Promise.resolve();
} else {
return Promise.reject(i18n.t("general.validation.invalidphone"));
const p = phone(getFieldValue(name), "us");
const p2 = phone(getFieldValue(name), "ca");
if (p.length > 0 || p2.length > 0) {
return Promise.resolve();
} else {
return Promise.reject(i18n.t("general.validation.invalidphone"));
}
}
// PhoneInput({