Feb 18, 2016, 4:09 PM
2 Posts

Radio button groups are always valid

  • Category: Server Side JavaScript
  • Platform: All
  • Release: 9.0.1
  • Role: Developer
  • Tags: xpages,radiogroup,isvalid
  • Replies: 0

Just discovered something unwelcome while working on some form validation:

A radioGroup control always returns isValid() = true, even if it has a validator which returns false, and even if it has an error message posted to it.

Example code at https://gist.github.com/lpar/7b5c823a7dfca912054d

(The reason this matters is that you might want to validate that some radio button choices are consistent with choices made elsewhere on a form, and present a message based on whether they are or not.)