src/Model/Address.php
public function getRequiredFields()
    {
        $fields = self::config()->required_fields;
        //hack to allow overriding arrays in ss config
        if (self::$required_fields != $fields) {
            foreach (self::$required_fields as $requirement) {
                if (($key = array_search($requirement, $fields)) !== false) {
                    unset($fields[$key]);
                }
            }
        }
        //set nicer keys for easier processing
        $fields = array_combine($fields, $fields);
        $this->extend('updateRequiredFields', $fields);
        //don't require country if shop config only specifies a single country
        if (isset($fields['Country']) && SiteConfig::current_site_config()->getSingleCountry()) {
            unset($fields['Country']);
        }

        return $fields;
    }
public function getRequiredFields()
    {
        $fields = self::config()->required_fields;
        //hack to allow overriding arrays in ss config
        if (self::$required_fields != $fields) {
            foreach (self::$required_fields as $requirement) {
                if (($key = array_search($requirement, $fields)) !== false) {
                    unset($fields[$key]);
                }
            }
        }
        //set nicer keys for easier processing
        $fields = array_combine($fields, $fields);
        $this->extend('updateRequiredFields', $fields);
        //don't require country if shop config only specifies a single country
        if (isset($fields['Country']) && SiteConfig::current_site_config()->getSingleCountry()) {
            unset($fields['Country']);
        }

        return $fields;
    }
Get an array of data fields that must be populated for model to be valid.
Required fields can be customised via self::$required_fields