Closed slavap closed 6 years ago
Indeed, and the annotation processor should probably fail if it does't return a boolean. I add this as improvements. If you have time and want to try we also welcome external contributions ;).
@adrienbaron Not sure I can contribute currently with the code, but I have such plans for 2018.
Ok I'll see to do this then π
I've just fixed 2 of the problems of this issue.
However regarding the default property to be able to use:
@PropValidator("size")
This would force to rename propertyName
to value
. This would be a breaking change, and for consistency we would have to do that on the other annotation that take propertyName
as parameter (like @Watch
).
I'm not sure the breaking change is worth it... But I would be glad to get your input on this.
@adrienbaron breaking change is not good of course, but in this case it makes sense IMO to do that. Existing code could be easily fixed, new code will be cleaner and shorter. Anyway, itβs up to you.
Hum, I guess you are right. And better to do breaking changes early to improve the API. So I'll follow your recommendation and do that π
@adrienbaron tested in beta6-snapshot, works, getting error on compile: [ERROR] Method variantValidator annotated with PropValidator must return a boolean. In VueComponent: com.axellience.vuegwtdemo.client.components.bootstrap.JqmButton
It would be nice to mention in documentation that validator method should return boolean, i.e.
Also declare propertyName as default, so it would be possible to use