update credentials validation for new requirements, add tests