kripod / kripod/bookshelf-validate

updating some not required fields triggers validator

Open
#13 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
8
Forks
5
PR merge metrics
No merged PRs in 30d

Description

I have a problem when I update a set of records

so for example if I have a student and this student has a list of books.

if I call
```
let books = await Books.where({student_id: id}).save({active: false}, {
method: 'update',
patch: true
});
```
although I am only changing the active, bookshelf validator throughs name is required (where the name is a required field in books table)

Any idea?

Contributor guide

No contributing guide indexed for this repository

Research direction

No files, tests, or entry points are named. Start by reproducing the provided Bookshelf.js update example and tracing how bookshelf-validate handles partial updates; done means changing only active succeeds without requiring the unchanged name field, with regression coverage for this case.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.