validation to query with jquery validation