Validating input based on an array collection can be very useful. It’s a great way to limit the user’s ability…