@omnifyjp/ts 2.1.8 → 2.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/php/type-mapper.js +2 -1
- package/package.json +1 -1
package/dist/php/type-mapper.js
CHANGED
|
@@ -73,7 +73,8 @@ const ARRAY_TYPES = new Set(['Json']);
|
|
|
73
73
|
/** Generate validation rules for a property (Store request). */
|
|
74
74
|
export function toStoreRules(property, tableName) {
|
|
75
75
|
const type = property['type'] ?? 'String';
|
|
76
|
-
|
|
76
|
+
// File type defaults to nullable (uploads are optional, attached separately)
|
|
77
|
+
const nullable = property['nullable'] ?? (type === 'File' ? true : false);
|
|
77
78
|
const unique = property['unique'] ?? false;
|
|
78
79
|
const vr = property['rules'];
|
|
79
80
|
const rules = [];
|