when clicked, validate rule