Skip to content

Commit

Permalink
feat: add item validation messages
Browse files Browse the repository at this point in the history
  • Loading branch information
pyphilia committed Nov 6, 2024
1 parent 713537a commit 674889f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/constants/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ export const FAILURE_MESSAGES = {
UNEXPECTED_ERROR: 'UNEXPECTED_ERROR',
EMAIL_ALREADY_TAKEN: 'EMAIL_ALREADY_TAKEN',

// item validation
INVALID_ITEM_NAME_PATTERN_ERROR: 'INVALID_ITEM_NAME_PATTERN_ERROR',
INVALID_ITEM_NAME_MAX_LENGTH_ERROR: 'INVALID_ITEM_NAME_MAX_LENGTH_ERROR',

FILE_IS_NOT_IMAGE: 'FILE_IS_NOT_IMAGE',

// file upload limiter
Expand Down
4 changes: 3 additions & 1 deletion src/langs/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -154,5 +154,7 @@
"ENROLL": "You successfully enrolled to the item.",
"CANNOT_REGISTER_ON_FROZEN_ITEM_LOGIN_SCHEMA": "Cannot register on the targeted item because the subscription has been frozen by its owner",
"CANNOT_ENROLL_FROZEN_ITEM_LOGIN_SCHEMA": "Cannot enroll in the targeted item because the subscription has been frozen by its owner",
"NOT_MEMBER_OR_GUEST": "Your account is not registered as member or pseudonimized user"
"NOT_MEMBER_OR_GUEST": "Your account is not registered as member or pseudonimized user",
"INVALID_ITEM_NAME_PATTERN_ERROR": "The item's name is not valid. It should start and end with an alphabetical character.",
"INVALID_ITEM_NAME_MAX_LENGTH_ERROR": "The item's name is too long."
}

0 comments on commit 674889f

Please sign in to comment.