Skip to content

Validation checks flags on schema inputs #24

@amuta

Description

@amuta

Alllow for using flags so we can control when to generate type/domain checks on inputs on the generated target code.

schema do
  input do
    integer :x, domain: 1..100 
    integer :y # maybe validates: { domain: 1..1000,.... }
  end


...
end

Depending on how well it fits with the AST/IR, we could also assign an error class by target, or at least assign the error message.

Also it could be feasible to add validation declarations, which will probably just create a raise_error Op on a given expression

....
validate :valid_x_y, (input.x > 100) & (input.y > 100) which will probab

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions