private Iterable<String> validate(final String input) {
        if (optional && input.isEmpty()) return Lists.newArrayList();
        return FluentIterable
                .from(validators)
                .filter(new Predicate<Validator>() {
                    @Override
                    public boolean apply(Validator validator) {
                        try {
                            return !validator.valid(input);
                        } catch (Exception e) {
                            return true;
                        }
                    }
                })
                .transform(new Function<Validator, String>() {
                    @Override
                    public String apply(Validator input) {
                        return input.message();
                    }
                });
    }
private Iterable < String > validate ( final String input ) { if ( optional && input . isEmpty ( ) ) return Lists . newArrayList ( ) ; return FluentIterable . from ( validators ) . filter ( new Predicate < Validator > ( ) { @ Override public boolean apply ( Validator validator ) { try { return ! validator . valid ( input ) ; } catch ( Exception e ) { return true ; } } } ) . transform ( new Function < Validator , String > ( ) { @ Override public String apply ( Validator input ) { return input . message ( ) ; } } ) ; }
Validate user input with list of {@see Validator} and collect error messages if available

@param input user input as String
@return Iterable with error messages. Empty if valid.