basic validation class