faulty logic in validation error code

didn't output an error when input blank
missing type for converttospace form field
Merge pull request #16 from jamiepratt/master

a fix for Moodle 2.5 and fixing problem with validation error logic