Depending on the work involved here, you might want to divide and conquer
Client Side Validation - Add Merchant
Try to submit a new merchant without ever typing anything into the New Merchant Name input field. What happens? Is this helpful or confusing to the user? Do we actually want users to be able to do this?
Refactor the submitMerchant function to make sure there is data in that input field before trying to post that data. This is called client-side validation. There are several appropriate ways you could accomplish this.
Your choices are between:
****Client Side Validation- Add Merchant
Depending on the work involved here, you might want to divide and conquer
Client Side Validation - Add Merchant Try to submit a new merchant without ever typing anything into the New Merchant Name input field. What happens? Is this helpful or confusing to the user? Do we actually want users to be able to do this?
Refactor the submitMerchant function to make sure there is data in that input field before trying to post that data. This is called client-side validation. There are several appropriate ways you could accomplish this.