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

@gaurave
space and hyphen(-) are allowed in filenames.