Following a tutorial about how to do form validation in React.
Need to practice how to set up form validation ready for my Football team project.
I wanted to emulate what I would ideally like on the football app, and that is a name validation field, which only accepts numbers, letters, hyphens, spaces and apostrophes. Found some code on Stack overflow which does this:
nameValid = value.match(/^[a-zA-Z][a-zA-Z0-9 \-']+$/);
Will now try and refactor my form on the football app to include this.