Use ActiveModel::Validations on components
nicolas-brousse opened this issue · comments
I think it could be nice to be able to use ActiveModel::Validations
on a component.
Since a component is a module
like an helper. I think we can't do this for now.
Component should be a class
to be able to do this.
I totally agree, this would be great.
Since this implies using classes instead of modules. It's something that should only appear in a major realease, with broken changes I guess.
Having any sort of way to custom validate a property would be great - not saying you need a whole system like React's PropTypes, but at least a simple way to pass and execute a :validator
option on definition perhaps