better url for validation and fixed problem in template error rendering