Skip to content

Commit

Permalink
refactor(Chat): position validationErrors before docblock
Browse files Browse the repository at this point in the history
  • Loading branch information
bludnic committed Nov 2, 2023
1 parent 605d997 commit eb0464c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/components/Chat/Chat.vue
Original file line number Diff line number Diff line change
Expand Up @@ -304,17 +304,17 @@ function getUserMeta(userId) {
return user
}
/**
* Validate message before sending.
* @param {string} message
* @returns {string | false} If `false` then validation passed without errors.
*/
const validationErrors = {
emptyMessage: 'EMPTY_MESSAGE',
notEnoughFunds: 'NON_ENOUGH_FUNDS',
notEnoughFundsNewAccount: 'NON_ENOUGH_FUNDS_NEW_ACCOUNT',
messageTooLong: 'MESSAGE_LENGTH_EXCEED'
}
/**
* Validate message before sending.
* @param {string} message
* @returns {string | false} If `false` then validation passed without errors.
*/
function validateMessage(message) {
// Ensure that message contains at least one non-whitespace character
if (!message.trim().length) {
Expand Down

0 comments on commit eb0464c

Please sign in to comment.