Skip to content

Validation Object expects all properties to be set #83

@IamSebastianDev

Description

@IamSebastianDev

Describe the bug

When setting validation on a Collection, all properties need to be set, instead of just available. While this is not necessarily a problem, as the property can receive a empty [] containing no validators, a better qol improvement would be to change the typings of the validation object to a Partial<T>.

To Reproduce
Steps to reproduce the behavior:

  1. Create a Collection and add a Schema
  2. Add a Validation Object to the Collection
  3. You now see that all properties must be set

Expected behavior
I expect to only set the fields that I would want to validate

Screenshots

Additional context
This is a TypeScript only issue, as the bug in question stems from the implemented type system for the validation.

Metadata

Metadata

Labels

bugSomething isn't workingtypescriptA bug or feature that only affects the library when using it with typescript

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions