Skip to content

Commit

Permalink
Modified validate file b00tc4mp#99
Browse files Browse the repository at this point in the history
  • Loading branch information
TatiGV committed Aug 11, 2024
1 parent 38513e1 commit 3770144
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions staff/tatiana-garcia/project/com/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ function validateCity(city) {

function validateDescription(description, explain = 'description') {
validateString(description, 'description')
if (description < 1 && description > 200) throw new ValidationError(`the ${description} must have more than 5 characters and less than 50 characters`)
if (typeof description !== 'string') throw new ValidationError(`${description} is not a string`)
if (description < 1 && description > 200) throw new ValidationError(`the ${explain} must have more than 5 characters and less than 50 characters`)
if (typeof description !== 'string') throw new ValidationError(`${explain} is not a string`)
}

function validateUrl(url, explain = 'url') {
Expand Down

0 comments on commit 3770144

Please sign in to comment.