-
-
Notifications
You must be signed in to change notification settings - Fork 20
Closed
Labels
component:validatorkind:bugAn existing feature isn't working as expectedAn existing feature isn't working as expected
Description
Using the example from https://athenaframework.org/Validator/Constraints/Callback/#Athena::Validator::Constraints::Callback--instance-methods:
> 1 |
> 2 |
> 3 | obj.validate
^-------
Error: wrong number of arguments for 'Example#validate' (given 0, expected 2)
Overloads are:
- Example#validate(context : AVD::ExecutionContextInterface, payload : Hash(String, String) | ::Nil)Debugging the macro logic:
# Add property constraints
# Add getter constraints
class_metadata.add_getter_constraint(
AVD::Metadata::GetterMetadata(T, 1).new("validate"),
Athena::Validator::Constraints::Callback.new # Default argument
)
# Add callback constraintsIt seems to be adding the method as a getter and not as a callback method.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
component:validatorkind:bugAn existing feature isn't working as expectedAn existing feature isn't working as expected