I am trying to null check in one input field and pop up a required message in another input field. To achieve this function i have used the below Javascript code.
$(document).on('change', '.address',function () {
if ($(this).val() == null ) {
$('#cutomer_id').prop('required',true);
}
});
but this is not working as expected. but when i try the opposite if ($(this).val() != null ) its fire the required messege.