This is the user input validation function working in edit frame