Adding new AJAX function for player validation