Improved number validation (#11131)

* fix(purchasing): more number validation

* test(purchasing): add error cases
Also refactor NaN check and create client mixin

* fix(purchasing): cover "purchase" cases
This commit is contained in:
Sabe Jones
2019-04-23 15:19:49 -05:00
committed by GitHub
parent 9f09a0396b
commit 6f7cd96e9f
9 changed files with 109 additions and 10 deletions

View File

@@ -9,6 +9,7 @@ module.exports = {
itemNotFound: 'Item "<%= key %>" not found.',
questNotFound: 'Quest "<%= key %>" not found.',
spellNotFound: 'Skill "<%= spellId %>" not found.',
invalidQuantity: 'Quantity to purchase must be a positive whole number.',
invalidTypeEquip: '"type" must be one of "equipped", "pet", "mount", "costume"',
missingPetFoodFeed: '"pet" and "food" are required parameters.',
missingEggHatchingPotion: '"egg" and "hatchingPotion" are required parameters.',