check for cpr and return error object

if regex match fails it will return error object with error message