Refine 'pattern' and 'required' attributes on dialog fields

@gaurave
Actually, I'd prefer to avoid that. Spaces always seem to cause problems, and I think it'd be nice it project names at least somewhat approximated identifiers in typical langauges.