Required field issue

I have set a default value for a field in a generated form and have set the constraint ‘required’ for this field. However even if the default value is populated, when submitting the form I get the error

Cannot submit task form xxxxxxxxxx: Invalid value submitted for form field ‘ff_uname’: validation of required failed.

Only if I clear the field and retype, does the error disappear and the form gets submitted.

Any pointers on what might be the issue is much appreciated.