Boundary validation respects masks