--- a/inst/@galois/dftmtx.m
+++ b/inst/@galois/dftmtx.m
@@ -65,3 +65,7 @@
   endfor
 
 endfunction
+
+%%Test input validation
+%!error dftmtx (gf (1, 12))
+%!error dftmtx (gf (eye (3), 4))