Open 2bad2furious opened 7 years ago
Please use only english on GitHub.
Rewriten in English.
Thanks
Non-static methods' names could look similar to current static methods' names (Class->methodname would result in {"op":"Class[some separator]methodname"})
👍
Closures' names could be generated by the name attribute as seen in my example below
👎 it is too tricky
Users could name methods and closures themselves
That would be fine, but there is no way to do it.
You could achieve that by doing something like $form->....->addRule(callable,"name");
I don't think anything would change for other types of functions.
How is this related with onSuccess
?
Brainlag, sry.
Description
I think it would be great to have helpers for closures and non-static methods. It can make JS validation easier and could lead to better code-writing. Correct me if I'm wrong, but for a good JS validation you have to use static methods or named functions that honestly don't belong there.
Naming those methods and closures could look like:
exportRules() EXAMPLE