Skip to content

required attributes misleading #195

Open
@cdaringe

Description

@cdaringe

hi all:

i'm curious how everyone has internalized required attributes. the docs make note of how they behave, but do we actually believe this is the correct behavior?

example: if my model has a prop _rev that is as required string, and I instantiate new MyModel() without any attrs, I expect &-state to error. In actuality, &-state eventually returns the default for a string definition, thus _rev is initially ''. @HenrikJoreteg originally put in _verifyRequired, which is dead code in &-state now and doesn't accomplish what I suggest, but seems as though it may have been the intent.

id like to hear folks opinions. I want instantiation assertion, along with .set assertion i already get from the lib when changing my state.

thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions