civicrm/civicrm-core — pull request #1917 by monishdeb (2013-11-06 13:24:06+00:00)
Title: CRM-11881 fix - State/Province required-ness fix if Country doesn't contain it on CiviProfile

Currently it is not able to write formrule on state-province required-ness as its scope is limited to CRM_Core_Form. So the alternative is to change is_required attribute of state/province field in buildquickForm after submit on the basis of a function checkRequiredStateProvince() used by billing block. Also I have to bring some changes in the function to also consider onBehalf profile as in this case $_submitValues has values of On Behalf of profile in separate index 'onbehalf' otherwise its a usual profile. The patch solves the State/Province requiredness issue on CiviProfiles including 'On Behalf of' and the same issue on profile create/edit mode (CRM-10185)