feat: add validation message for title and employer input
This commit is contained in:
parent
645f731a74
commit
cd68d6f64c
|
@ -81,7 +81,7 @@ const Geolocation: FC<Props> = ({
|
|||
const data = () => {
|
||||
isCountry
|
||||
? geonames.countryInfo({}).then((res: any) => {
|
||||
console.log(res);
|
||||
// console.log(res);
|
||||
setOptions(res.geonames);
|
||||
})
|
||||
: geonames.children({ geonameId: geoId }).then((res: any) => {
|
||||
|
|
|
@ -36,10 +36,14 @@ export const profileSchema = z.object({
|
|||
jobcountry: z.string().min(1, { message: "Please select a country" }),
|
||||
jobstate: z.string().min(1, { message: "Please select a job state" }),
|
||||
jobcity: z.string().min(1, { message: "Please select a city" }),
|
||||
jobtitle: z.string(),
|
||||
// .min(3, { message: "First Name must be at least 3 characters" }),
|
||||
employer: z.string(),
|
||||
// .min(3, { message: "First Name must be at least 3 characters" }),
|
||||
jobtitle: z
|
||||
.string()
|
||||
.trim()
|
||||
.min(1, { message: "Please enter your job title" }),
|
||||
employer: z
|
||||
.string()
|
||||
.trim()
|
||||
.min(1, { message: "Please enter your employer name" }),
|
||||
startdate: z
|
||||
.string()
|
||||
.refine((value) => /^\d{4}-\d{2}-\d{2}$/.test(value), {
|
||||
|
|
Loading…
Reference in New Issue