Add unit test, change validation in module