I have a similar problem to skigirl1369.
I was trying to find why, and I saw this lines:
jQuery('input#field_<?php echo bp_get_the_profile_field_id(); ?>[type=file]').change(function() {
if (jQuery(this).val() !== '') {
jQuery('input#field_<?php echo bp_get_the_profile_field_id(); ?>[type=hidden]').val('-');
} else {
jQuery('input#field_<?php echo bp_get_the_profile_field_id(); ?>[type=hidden]').val('');
}
});
From what I can understand, when the value of the input file changes (i.e. you choose a file on your computer), the hidden value is set to ‘-‘, otherwise (when? there’s no chance you can unset a chosen file…) it should be set to ”.
Problem is, the hidden fields for every input type=”file” are *already* set to ‘-‘ when you load the form (I’m talking of a completely empty profile, fist time it’s edited). So if you submit the form without uploading any file, the hidden fields, that are checked by Buddypress, are posted with a value ‘-‘, so they are not empty and BP doesn’t return an error even if they are required.
Shouldn’t empty files be set to ” (empty string) when building the form to be sent to the browser?