feat(validation): limites de inputs y mensajes de error claros#9
Merged
Conversation
- storyPoints acotado a 1-21 (TaskRequest) - actualHours: positivo, máx 999.99, hasta 2 decimales (StatusChangeRequest) - búsqueda por email y velocity sprints (1-50) validados con @validated - password de login limitado a máx 100 caracteres - tope de paginación: max-page-size=500, default-page-size=20 - GlobalExceptionHandler antepone el campo y maneja ConstraintViolationException (400 en vez de 500) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resumen
Establece límites de validación en los inputs que no tenían ninguna restricción y mejora los mensajes de error que recibe el usuario. Surge de una revisión de sanitización/validación de todos los DTOs de request, query params, paginación y handlers del bot.
Cambios
Límites de inputs
TaskRequest.storyPoints: acotado a1–21(escala Fibonacci).StatusChangeRequest.actualHours:@Positive, máx999.99, hasta 2 decimales.UserController.searchByEmail:@Validated+ param@NotBlank @Email @Size(max=100).DashboardController.velocity:@Validated+sprintsacotado a1–50.LoginRequest.password: máx 100 caracteres (alineado con el registro).max-page-size=500,default-page-size=20(el tope de 500 cubre elsize:500que usa el frontend en Backlog y Tasks).Mensajes de error
GlobalExceptionHandlerahora antepone el nombre del campo en los errores de body (campo: mensaje).ConstraintViolationException→ devuelve400 VALIDATION_ERROR(antes los params inválidos caían en500).ErrorResponse.message→api.js→ toast rojo / mensaje inline.Alcance / notas
Pruebas
Pendiente de validación en el pipeline en la nube (no se compila localmente).
🤖 Generated with Claude Code