Skip to content

[Feature Proposal] Allow users to extend default options #50

@wenderjean

Description

@wenderjean

Description

  • We should allow users to extend defaults and set generic options for their own Structure instance.

Use cases

  • Empty strings: The default behavior for Strings is not to allow empty values, we can set empty: true for each domain but it would be great if we can do a generic configuration.
  • It can also prepare the codebase for this feature.

Example

const MyStructure = Structure.extends({
  validations: [
    {
      type: String,
      empty: true
    }
  ]
});

module.exports = MyStructure;

cc/ @talyssonoc

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