modularized validation in arraymorph