Using automatic validation in models