if (values == null || values.length == 0) {
FileBean file = null; if (req.isMultipart() && (file = req.getFileParameterValue(name)) != null) { if (file.getSize() <= 0) { errors.add(name, new ScopedLocalizableError("validation.required", "valueNotPresent")); } }  else if (values == null || values.length == 0) {
    protected void checkSingleRequiredField(String name,                                            String strippedName,                                            String[] values,                                            ValidationErrors errors) {        if (values == null || values.length == 0) {            ValidationError error = new ScopedLocalizableError("validation.required",                                                               "valueNotPresent");            error.setFieldValue(null);            errors.add( name, error );        }        else {            for (String value : values) {                if (value.length() == 0) {                    ValidationError error = new ScopedLocalizableError("validation.required",                                                                       "valueNotPresent");                    error.setFieldValue(value);                    errors.add( name, error );                }            }        }    }