ForEach
in each input of the form and check if they are required
$('#form').find('input').each(function(){
if(!$(this).prop('required')){
// É required
} else {
// Não é required
}
});
In order for the input to be red-colored, you can use jQuery to change the input css, and change the outline to red.