validate register