Validation for S3 UI fields

Uses the new i18n system for error messages, and HTML5 form validation attributes.