Bug #2889

Empty Selector widget not validated

Added by Davide Principi almost 7 years ago. Updated almost 7 years ago.

Status:CLOSEDStart date:
Priority:NormalDue date:
Assignee:-% Done:

100%

Category:-
Target version:v1.6.1
Security class: Resolution:NOTABUG
Affected version:v1.6.0 NEEDINFO:No

Description

The Selector widget (when rendered as SELECT) is not validated if its data source is empty.

In this case, it is rendered without any OPTION tag and is not included in FORM submission.

An hidden INPUT may be added to provide a default value.

Empty_Selector_widget_not_validated.patch Magnifier (3.34 KB) Davide Principi, 10/01/2014 09:01 AM


Related issues

Related to NethServer 6 - Bug #2852: Changing role to a red interface doesn't remove it from p... CLOSED
Related to Nethgui - Enhancement #2890: Selector widget: support validation tooltip CLOSED

History

#1 Updated by Davide Principi almost 7 years ago

  • Related to Bug #2852: Changing role to a red interface doesn't remove it from providers added

#2 Updated by Davide Principi almost 7 years ago

This is the proposed solution: Empty_Selector_widget_not_validated.patch

#3 Updated by Davide Principi almost 7 years ago

  • Status changed from TRIAGED to ON_DEV
  • Assignee set to Davide Principi
  • % Done changed from 20 to 30

#4 Updated by Davide Principi almost 7 years ago

#5 Updated by Davide Principi almost 7 years ago

  • Status changed from ON_DEV to MODIFIED
  • Assignee deleted (Davide Principi)
  • % Done changed from 30 to 60

#6 Updated by Davide Principi almost 7 years ago

  • Status changed from MODIFIED to CLOSED
  • % Done changed from 60 to 100
  • Resolution set to NOTABUG

NOTABUG

The requested behaviour is not always desirable; anyway it can be easily implemented by adding an Hidden widget to the form, before the Selector.

Moreover the validation error message is application specific. A generic error message saying "that value is not in the empty set" is not descriptive of the error.

See Enhancement #2890

Also available in: Atom PDF