I have created dynamic input field in the React component, but don\'t know how to validate this dynamic field data on the client-side when onChange and onSubmit event occurr