fix problem with ErrorBuilder
added validation test
added new function beg and end
updated test