change merge validate errors to MergeError from ValueError
Final changes from #16275 that failed to push before merge. Converts errors from `validate` argument of `merge` command to `MergeError`s from `ValueError`s. 
