                    $this->AddValidationError($prop, "$prop exceeds the maximum length of " . $fm->FieldSize . "");
                }

                if ($this->$prop == "" && ($fm->DefaultValue || $fm->IsAutoInsert)) {
                    // these fields are auto-populated so we don't need to validate them unless
                    // a specific value was provided
                } else {
                    switch ($fm->FieldType) {
                        case FM_TYPE_INT:
                        case FM_TYPE_SMALLINT:
                        case FM_TYPE_TINYINT:
                        case FM_TYPE_MEDIUMINT:
                        case FM_TYPE_BIGINT:
                        case FM_TYPE_DECIMAL:
                            if (! is_numeric($this->$prop)) {
                                $this->AddValidationError($prop, "$prop is not a valid number");
                            }
                            break;
                        case FM_TYPE_DATE:
                        case FM_TYPE_DATETIME:
                            if (strtotime(($this->$prop ?? '')) === '') {
                                $this->AddValidationError($prop, "$prop is not a valid date/time value.");
                            }
                            break;
                        case FM_TYPE_ENUM:
                            if (! in_array($this->$prop, $fm->GetEnumValues())) {
                                $this->AddValidationError($prop, "$prop is not valid value. Allowed values: " . implode(', ', $fm->GetEnumValues()));
                            }
                            break;
                        default:
                            break;
                    }
                }
            }
NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset.