Skip to content

Commit

Permalink
Adjusting role validation rules
Browse files Browse the repository at this point in the history
  • Loading branch information
maayarosama committed Apr 23, 2024
1 parent 64b0bc3 commit c0a4a1e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client/src/components/UpdateUser.vue
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ export default {
selectedUser.value.user_type = selectedUser.value.user_type === "Team Lead" ? "Supervisor" : selectedUser.value.user_type
await $api.myprofile.update(selectedUser.value.id, {
...selectedUser.value,
image: imageUrl.value ? imageUrl.value : selectedUser.value.image,
image: imageUrl.value ? imageUrl.value : null,
location: selectedUser.value.location.id,
filename: image.value ? image.value[0].name : null,
reporting_to: reporting_to.value ? [reporting_to.value.id] : []
Expand Down
2 changes: 1 addition & 1 deletion client/src/utils/validators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const jobRules = [
(v: string) => typeof v === 'string' || 'Role must be a string.',
(v: string) => !!v || 'Role is required.',
(v: string) =>
(v && v.length >= 3 && v.length <= 150) || 'Role must be between 3 and 150 characters.'
(v && v.length >= 2 && v.length <= 150) || 'Role must be between 2 and 150 characters.'
]

export const addressRules = [
Expand Down

0 comments on commit c0a4a1e

Please sign in to comment.