form validation now works and post is now handled by ajax