Aria-required on jquery submit form

let's say has the following form

<form action="post">
     <label for="firstName">First name:</label>
     <input id="firstName" type="text" aria-required="true" />
     <input type="submit" value="submit">


and with jQuery i want to do $.post()

i use the following jQuery script

        $(SUBMIT_BTN).on('click', function(e){
            var data = $('form').serialize() + '&action=save_customer';
                url: MYRUL,
                method: 'POST',
                data:  data,
                success: function(response){


with this script the required aria does not work. how to trigger the check in this case?

PS: I want to use this aria-required

one while avoiding jQuery plugins


source to share

1 answer

use required="required"




All Articles