document).ready( function () {
	checkPasswordValid()
	checkSubmitForm()
});

function checkPasswordValid() {
	$('#password, #password_confirmation').on('keyup', function () {
	  if ($('#password').val() == $('#password_confirmation').val()) {
	  	$('#message').html('Matching').css('color', 'green');
	  } else {
	    $('#message').html('Not Matching').css('color', 'red');
	  }
	})
}

function checkSubmitForm() {
    
	$("#user-create-form").submit(function(event) {
	    let roles = $('input[name="roles"]:che