add form validation feature,and preAddCourse is OK.