Validation message for update

I have used the same method as you suggested.But Error message is not gets updated to master table when there is no other errors in it.kindly update me solution for this.