[ 
https://issues.apache.org/jira/browse/VALIDATOR-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17906726#comment-17906726
 ] 

Elliotte Rusty Harold commented on VALIDATOR-497:
-------------------------------------------------

An enum feels too restrictive for this use case. There will always be new 
reasons. This seems like a classic case for simple classes and subclasses, with 
new subclasses added as needed for new reasons. 

I don't see any reason to use exceptions here. Exceptions as return types are 
weird and unexpected. 

> Extends validation result of IBANValidator
> ------------------------------------------
>
>                 Key: VALIDATOR-497
>                 URL: https://issues.apache.org/jira/browse/VALIDATOR-497
>             Project: Commons Validator
>          Issue Type: New Feature
>            Reporter: Slawomir Jaranowski
>            Priority: Major
>             Fix For: 1.10.0
>
>
> Currently we have a method {{IBANValidator#isValid}} which return true or 
> false depends on validation result.
> But for false result we don't know a reason, which can be like unsupported 
> country, invalid pattern, invalid checksum and so on ...
> Proposition is to add next method which throw exception with more details 
> about reason of failed verification.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to