add validation to the fields

Signed-off-by: Fons <lord.fontana@gmail.com>