Validates credential