Improve constraint validation