client validation util with spec