added functionality to dynamically check formats of credentials passed to function to validatorTrait with tests on traitConcrete class