Create bp-custom.php

function to add in bp-custom.php
it modifies xprofile fied class by using function bp_get_the_profile_field_is_required() and hook filter bp_field_css_classes (can be find in the function bp_get_field_css_class() in bp-xprofile-template.php file).