modified validation erorr handling
added session flash
added flash in view