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

@gaurave
This will not allow a space in filename.