validate stages on backend