Skip to content

Featrure: Validate component input data #21

@markuplab

Description

@markuplab

Now components look like black box and developer should go deeper (methods, template) to know how component work inside and what data they accept. I think, we should add validation for input.

Example:

Component.types = {
  watcher: {
    name: String, // Required by-default.
    age: {
      required: false,
      type: Number
    }
  },
  attributes: ['id', 'type', 'cat-id'], // All attributes is strings
  props: {
    theme: String
  }
};

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions