Add validator isInvalid flag

Closes #166