add callback used for jquery validation