Assert.assertNotNull(configuration);
ConstraintMapping mapping = new ConstraintMapping();
mapping.type(Employee.class).property("firstName", FIELD)
.constraint(new EmailDef().message("Invalid Email!You have entered:--\\{${validatedValue}\\}"));
final MessageInterpolator messageInterpolator = new ValueFormatterMessageInterpolator();
configuration.messageInterpolator(messageInterpolator);
configuration.addMapping(mapping);
ValidatorFactory factory = configuration.buildValidatorFactory();
Validator validator = factory.getValidator();