Opened 10 years ago

Last modified 9 years ago

#12005 closed defect

Validating a value is present for MultiSelect — at Version 4

Reported by: anonymous Owned by: Olli Kallioinen
Priority: normal Component: DynamicFieldsPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.0

Description (last modified by Ryan J Ollos)

What's the best implementation for validating for value <> '' for unhidden custom fields. I am using DynamicFieldsPlugin with MultiSelectFieldPlugin. Here is a sample of my trac.ini:

ci_appls = text
ci_appls.clear_on_hide = true
ci_appls.format = list
ci_appls.hide_when_component = Facility
ci_appls.invalid_if =
ci_appls.label = Application CIs Affected
ci_appls.multiselect = true
ci_appls.options = Desk Top|Help Desk Application
ci_appls.order = 8
ci_appls.value =
ci_appls.show_when_component = Applications
ci_facility = text
ci_facility.clear_on_hide = true
ci_facility.format = list
ci_facility.hide_when_component = Applications
ci_facility.invalid_if =
ci_facility.label = Facility CIs Affected
ci_appls.multiselect = true
ci_appls.options = Power|Cooling
ci_appls.order = 9
ci_appls.value =
ci_appls.show_when_component = Facility

The invalid_if does not catch the error.

Change History (4)

comment:1 Changed 10 years ago by Olli Kallioinen

Sorry, I haven't used DynamicFieldPlugin so I don't know.

comment:2 Changed 10 years ago by anonymous

Regardless of the DynamicFieldPlugin, if I want to ensure something is selected from the multi select field when it is not hidden how would I do it?

comment:3 Changed 10 years ago by anonymous

I believe the fact that it is a list is throwing off the "invalid_if" check from the DynamicFieldsPlugin.

comment:4 Changed 10 years ago by Ryan J Ollos

Description: modified (diff)
Note: See TracTickets for help on using tickets.