Adds check of the length of code in the items and in the admin interface.
Changed exception message.
Using a central abstract method for code checks.
Merge pull request #151 from doleiynyk/2012-04-24_code_not_longer_than_32_chars

Adds check for the length of the code in the items and in the admin interface