1602 / 1602/jugglingdb

Validations should be revisited

Aperta
#447 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
2k
Fork
238
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

- 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()`

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
javascript, nodejs
Ambito
backend, databases
Tipo di issue
Refactoring
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
20/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.