Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/Onboarding.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ interface OnboardingProps {

// Validation schema
const onboardingSchema = z.object({
name: z.string().min(2, 'Name must be at least 2 characters').max(50, 'Name is too long'),
role: z.string().min(2, 'Role must be at least 2 characters').max(50, 'Role is too long'),
name: z.string().trim().min(2, 'Name must be at least 2 characters').max(50, 'Name is too long'),
role: z.string().trim().min(2, 'Role must be at least 2 characters').max(50, 'Role is too long'),
bio: z.string().max(500, 'Bio must be less than 500 characters').optional(),
skills: z.string().max(200, 'Skills list is too long')
.refine(val => !val || val.split(',').every(skill => skill.trim().length > 0), {
Expand Down
4 changes: 2 additions & 2 deletions src/components/UserProfile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ interface UserProfileProps {

// Validation schema
const profileSchema = z.object({
name: z.string().min(2, 'Name must be at least 2 characters').max(50, 'Name is too long'),
role: z.string().min(2, 'Role must be at least 2 characters').max(50, 'Role is too long'),
name: z.string().trim().min(2, 'Name must be at least 2 characters').max(50, 'Name is too long'),
role: z.string().trim().min(2, 'Role must be at least 2 characters').max(50, 'Role is too long'),
bio: z.string().max(500, 'Bio must be less than 500 characters').optional(),
skills: z.string().max(200, 'Skills list is too long')
.refine(val => !val || val.split(',').every(skill => skill.trim().length > 0), {
Expand Down