validate the function which parses the form of request