add validation rules
save submitted data into database