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

@gaurave