Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
EvilSpartans committed Sep 23, 2024
1 parent 96ab265 commit c275c72
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/components/forms/PostForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ export default function PostForm() {
const fetchPortals = async () => {
try {
const jobiboxId = localStorage.getItem('jobiboxId');

if (jobiboxId === null) {
setStudiesOptions(getEducationLevelsByCountry("France"));
setContractOptions(getContractTypesByCountry("France"));
}

const response = await dispatch(getJobiboxPortals({id: jobiboxId}));
const portalsData = response.payload;

Expand Down
2 changes: 0 additions & 2 deletions src/utils/Validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ import * as Yup from "yup";
export const signUpSchema = Yup.object({
firstname: Yup.string()
.required("Le prénom est requis")
.matches(/^[a-zA-Z_ ]*$/, "Caractères spécials non autorisés.")
.min(2, "Le prénom doit contenir entre 2 et 25 caractères")
.max(25, "Le prénom doit contenir entre 2 et 25 caractères"),
lastname: Yup.string()
.required("Le nom est requis")
.matches(/^[a-zA-Z_ ]*$/, "Caractères spécials non autorisés.")
.min(2, "Le nom doit contenir entre 2 et 25 caractères")
.max(25, "Le nom doit contenir entre 2 et 25 caractères"),
email: Yup.string()
Expand Down

0 comments on commit c275c72

Please sign in to comment.