Move validation to xml files.