Mail validation implemented

Mail must be sample@mail.com. Otherwise, throws message. Validation
taken from JavaEE 7 Recipes.