Additions, fixes

Added validation exception, fixed pdo database has method.