Skip to content

validation, schema: improve types #52

@blikblum

Description

@blikblum

When a error in prevalidate occurs it returns a record

Currently is necessary to typecast explicitly

      const errors = model.preValidate({
        name: '',
        email: 'test@example.com',
      }) as Partial<Record<keyof TestAttributes, string>>;

Also return undefined instead of empty string when no attribute to validate

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions