class AbstractFormItem implements FormItem<T> {

    @SuppressWarnings({"SimplifiableIfStatement", "WeakerAccess"})
    boolean requiresValidation() {
        if (isRequired()) {
            return true;
        }

        if (!validationHandlers.isEmpty()) {
            // if there's a validation handler with ValidationRule == ALWAYS,
            // we need to validate for sure, otherwise we only need to validate
            // if the form item is modified
            if (validationHandlers.stream().anyMatch(vh -> vh.validateIf() == ALWAYS)) {
                return true;
            } else {
                // only validation handler with ValidationRule == IF_MODIFIED,
                // return true if the form item is defined && modified
                return !isUndefined() && isModified();
            }
        }

        // no validation handlers - no need to validate
        return false;
    }

      AbstractFormItem(String name, String label, String hint);

}