1602 / 1602/jugglingdb

Validations should be revisited

Aberta
#447 0 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
JavaScript
Estrelas
2k
Forks
238
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

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

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
javascript, nodejs
Domínio
backend, databases
Tipo de issue
Refatoração
Dificuldade
5/5
Tempo estimado
Mais de uma semana
Status de atividade
Estagnada
Clareza
Precisa de esclarecimento
Facilidade para iniciantes
20/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.