validation error message fix

closes #19
add beforeValidation and afterValidation hook

closes #18