-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added company values filling form inputs and editCompany service
- Loading branch information
1 parent
1d05cf2
commit 2e4ebe9
Showing
9 changed files
with
280 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import * as yup from "yup"; | ||
import { HumanValidationReasons } from "../../../utils"; | ||
import FinishCompanyRegistrationSchema from "../Registration/Finish/FinishCompanyRegistrationSchema"; | ||
import { generateValidationRule } from "./EditCompanyUtils"; | ||
|
||
// export default FinishCompanyRegistrationSchema.concat(yup.object().shape({ | ||
// name: yup.string() | ||
// .required(HumanValidationReasons.REQUIRED) | ||
// .min(...generateValidationRule("name", "minLength", HumanValidationReasons.TOO_SHORT)) | ||
// .max(...generateValidationRule("name", "maxLength", HumanValidationReasons.TOO_LONG)), | ||
// })); | ||
|
||
export default yup.object().shape({ | ||
name: yup.string() | ||
.required(HumanValidationReasons.REQUIRED) | ||
.min(...generateValidationRule("name", "minLength", HumanValidationReasons.TOO_SHORT)) | ||
.max(...generateValidationRule("name", "maxLength", HumanValidationReasons.TOO_LONG)), | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { validationRulesGenerator, generalHumanError } from "../../../utils"; | ||
import { CompanyApplicationConstants } from "../../Apply/Company/CompanyApplicationUtils"; | ||
|
||
export const EditCompanyConstants = { | ||
name: { ...CompanyApplicationConstants.companyName }, | ||
}; | ||
|
||
export const generateValidationRule = validationRulesGenerator(EditCompanyConstants); |
Oops, something went wrong.