original_string: public function validate($data) {
          if (empty($data)) {
              return true;
          }
  
          try {
              \core_auth\digital_consent::parse_age_digital_consent_map($data);
          } catch (\moodle_exception $e) {
              return get_string('invalidagedigitalconsent', 'admin', $e->getMessage());
          }
  
          return true;
      }
code: public function validate($data) {
          if (empty($data)) {
              return true;
          }
  
          try {
              \core_auth\digital_consent::parse_age_digital_consent_map($data);
          } catch (\moodle_exception $e) {
              return get_string('invalidagedigitalconsent', 'admin', $e->getMessage());
          }
  
          return true;
      }
code_tokens: public function validate ( $ data ) { if ( empty ( $ data ) ) { return true ; } try { \ core_auth \ digital_consent :: parse_age_digital_consent_map ( $ data ) ; } catch ( \ moodle_exception $ e ) { return get_string ( 'invalidagedigitalconsent' , 'admin' , $ e -> getMessage ( ) ) ; } return true ; }
docstring: Validate the content and format of the age of digital consent map to ensure it is parsable.
  
  @param string $data The age of digital consent map from text field.
  @return mixed bool true for success or string:error on failure.
docstring_tokens: Validate the content and format of the age of digital consent map to ensure it is parsable .