I'm writing a custom form module.
Using Drupal7's FormAPI, I create a checkbox, the label/text diplayed next to it is set as described here
with the #title property,
$form['test'] = array( '#type' => 'checkbox', '#title' => t('This is the text that gets displayed next to the checkbox'), '#required' => TRUE, );
which then displays in the browser,
[ ] This is the text that gets displayed next to the checkbox
Ih there's an error in submission that involves that checkbox, e.g. in the example above being required but not being checked, an error box is shown across the top content-area that says
"X The This is the text that gets displayed next to the checkbox field is required"
I want to change that displayed error message to something other than the label/text. For example, on error,
"X Selecting the displayed checkbox is required."
"X You forgot to check the required checkbox. Please try again."
How do I set the error-message text to be different that the assigned label/text?