basic validator
added error info, test, new types