data
data copied to clipboard
Validate user action args
Make it possible to use a Data model in order to setup an action arguments.
Advantage:
- args can be define as Model field;
- args input can be validate using a model Validator;
Atk4/data UA must be improved to validate the $args againts the $ua->args definition (which needs also an improved phpdoc).
https://github.com/atk4/data/blob/06dc74732a/src/Model/UserAction.php#L144
Then these validations:
- https://github.com/atk4/ui/blob/8926412a31/src/UserAction/BasicExecutor.php#L71
- https://github.com/atk4/ui/blob/8926412a31/src/UserAction/BasicExecutor.php#L100
- https://github.com/atk4/ui/blob/8926412a31/src/UserAction/JsCallbackExecutor.php#L115
can be removed which are even wrong, as isset() will fail with null value like empty date.
This is a priority, so I renamed this issue and moved it into atk4/data.