update validation & add html_safe