Page MenuHomePhabricator

Ambiguous error from SecurePoll
Closed, DuplicatePublic

Description

When creating a poll, if you don't choose either no encryption or PGP options, the election won't save (correctly) but the error message you get is vague and doesn't tell you which field you have missed, specifically.

Event Timeline

Huji triaged this task as Lowest priority.May 1 2016, 9:30 PM

This seems to be more of a problem with HTMLForm; SecurePoll's include/pages/CreatePage.php uses that to create the form on poll creation page. The fields in question (Poll type, and Encryption) have a property 'required' => true and it is properly validated, yet HTMLForm fails to show a message next to the element when the validation fails. It only happens with radio buttons.

I can't think of other places were we generate radio buttons that are required, using the HTMLForm class. If one knows of an example, please share here. For now, I am also gonig to add HTMLForm tag.