jquery compatibility for validation