stories icon indicating copy to clipboard operation
stories copied to clipboard

State union should merge Argument validators.

Open proofit404 opened this issue 4 years ago • 0 comments

class A1State(State):
    v1 = Argument(is_integer)

class A2State(State):
    v1 = Argument(greater_than_7)

NewState = A1State & A2State

The v1 argument in the NewState would be both an integer and > 7.

Checks:

  • success
  • validation error in one condition (error message shows in what state it was defined)
  • in composition of thee layers

proofit404 avatar Apr 03 '21 01:04 proofit404