public static boolean isInputValid(Object object) {
		ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
        Validator validator = factory.getValidator();
        Set<ConstraintViolation<Object>> violations = validator.validate(object);
        List<String> errorMsgs = new ArrayList<String>();
        if (violations != null && !violations.isEmpty()) {
            for (ConstraintViolation<Object> violation : violations) {
                String errMsg = violation.getMessage().replaceAll("\\{\\}", violation.getInvalidValue().toString());
            	errorMsgs.add(errMsg);
            }
            errorMsgs.forEach( each -> {
                WorkflowLogger.error(ControllerActivity.INVALID_INPUT, each);
            });
            return false;
        }
        
        return true;
	}
Checks if input is valid based on Bean Validation
@param object
@return true if input valid else false
workflow-controller/controller-service/src/main/java/io/hyscale/controller/util/CommandUtil.java