Validation for S3 UI fields

Closes #30 

Uses the new i18n system for error messages, and HTML5 form validation attributes.
Can this be defined by a single regular expression? If not we'll need to use the original function approach, but if you know how to reduce it to a single one let me know.