private List<String> validateFields(JTextField[] fields, JLabel[] labels) {

        if (fields.length != labels.length) {
            throw new IllegalArgumentException("Count of fields has to be the same as count of labels");
        }

        List<String> errors = new ArrayList<>();

        for (int i = 0; i < fields.length; i++) {
            InputVerifier inputVerifier = fields[i].getInputVerifier();
            if (!inputVerifier.verify(fields[i])) {
                inputVerifier.shouldYieldFocus(fields[i]); // colorify input field

                if (inputVerifier instanceof NumericRequiredInputVerifier) {
                    errors.add(ResourceBundleProvider.getMessage("error.number", labels[i].getText()));
                } else if (inputVerifier instanceof RequiredInputVerifier) {
                    errors.add(ResourceBundleProvider.getMessage("error.mandatory", labels[i].getText()));
                }
            }
        }

        return errors;
    }