Add base validation code