Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Sanitization] Fine-tune input parsers (#192)
Add tests for various input parsers. Fixed the following bugs: * `searchCardsParamsValidator.cardIDs` checks for csv mongo IDs. * `addCardParamsValidator.tags` and `partialCardValidator.tags` check for csv. * `partialCardValidator.id` is required. * `partialCardValidator.urgency` checks for finite non-negative numbers. * `partialCardValidator` drops `metadataIndex` and `createdById` as these are read-only. * `partialCardValidator.lastReviewed` parses the value into a `Date` object. * `partialCardValidator` checks that `numChildren`, `numTimesMarkedAsDuplicate`, and `numTimesMarkedForReview` are non-negative finite integers. * `userSettingsParamsValidator.cardsAreByDefaultPrivate` checks for the `on` literal. * `userSettingsParamsValidator.dailyTarget` is now optional. * User names must be alphanumeric and at least 3 chars long. * Passwords must be at least 8 chars long.
- Loading branch information