Remote forms with blank required field still submitting.
I've got one required field in my remote form. It's a select field. If I don't select something and try to submit, it still does an ajax post. Clearly visible in Inspector > Networks.
From what I've read, the ajax:aborted:required event should be fired and the form should not submit. Am I wrong?
I've tried binding to that event and it doesn't seem to get fired.
Here's a basic cross-section of my form with all the useful details:
<form action="/object/123" data-remote="true" method="post">
<select required="required">
<option>option 1</option>
<option>option 2</option>
<option>option 2</option>
</select>
<input type="submit" value="Save">
</form>
Thanks for any help.
required select has one particularity. To it be valid you need a blank option. I don't know if we should check too. http://www.w3.org/TR/html5/forms.html#the-select-element
I see. That does complicate things, but it seems like it'd be worth it. I think we'd have to adjust the logic here?