add custom macros head and add jquery validity