form validation and display class detail