mdarifmustafa / vt-middleware

Automatically exported from code.google.com/p/vt-middleware
0 stars 0 forks source link

vt-password: Sub-classes of abstract rules should be able to return different error codes #184

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I've sub-classed AbstractDictionaryRule to create a different sort of 
validator. Unfortunately, I can't return a different error code from my rule 
without overriding AbstractDictionaryRule#validate. It should be possible to 
change the error code when creating sub-classes.

Original issue reported on code.google.com by max.spi...@york.ac.uk on 2 Aug 2013 at 1:15

GoogleCodeExporter commented 8 years ago

Original comment by dfis...@gmail.com on 2 Aug 2013 at 6:28

GoogleCodeExporter commented 8 years ago
That's the intended behavior.
#validate is what selects the error code.
We'd have to pass around all the interval variables in validate for another 
method to make the selection.
I don't think having to override #validate is that onerous.

Original comment by dfis...@gmail.com on 10 Oct 2014 at 2:38