app validation code