Console application has to exit with exitCode

fixes #562
Change validators from 'length' to 'string'
Merge pull request #564 from FrediL/master

Change validators from 'length' to 'string'