Validations should be revisited
- Vorherrschende Sprache
- JavaScript
- Sterne
- 2k
- Forks
- 238
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
- deprecate sync validations
- callback with error only (reject promise) instead of collecting errors on instance
- think of readable error messages instead of 'Validation error'
- fail after first validation error, when saving
- support `validateAll` method which will perform all validations and collect errors to replace previous functinality of `instance.errors` after `.isValid()`
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
The issue outlines a major refactor of the validation system in JugglingDB. Start by examining the current validation code, likely in a directory like lib/validations or within model definitions. Look for sync validation methods and error collection logic. Understanding the existing promise/callback patterns and how errors are currently attached to instances is key. The goal is to design a new API that deprecates sync validations, changes error handling, and adds a validateAll method.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript, nodejs
- Bereich
- backend, databases
- Issue-Typ
- Refactoring
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 20/100