@hestia-earth/data-validation 0.41.16 → 0.41.17
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/file-errors/public-api.d.mts +1 -1
- package/file-errors/public-api.d.ts +1 -1
- package/file-errors/public-api.js +421 -361
- package/file-errors/public-api.mjs +421 -361
- package/index.js +378 -363
- package/index.mjs +378 -363
- package/package.json +1 -1
- package/validation.json +378 -363
package/index.mjs
CHANGED
|
@@ -12,384 +12,374 @@ __export(validation_exports, {
|
|
|
12
12
|
});
|
|
13
13
|
var validations = [
|
|
14
14
|
{
|
|
15
|
-
function: "
|
|
15
|
+
function: "validate_id",
|
|
16
16
|
level: "error",
|
|
17
|
-
message: "must
|
|
17
|
+
message: "aggregation id must contain a product, region, start, end year, and a timestamp"
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
|
-
function: "
|
|
21
|
-
level: "
|
|
22
|
-
message: "
|
|
20
|
+
function: "validate_has_termType",
|
|
21
|
+
level: "warning",
|
|
22
|
+
message: "should contain at least one management node"
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
|
-
function: "
|
|
25
|
+
function: "validate_fallow_dates",
|
|
26
26
|
level: "error",
|
|
27
|
-
message: "must be in
|
|
27
|
+
message: "duration must be in specified interval"
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
|
-
function: "
|
|
30
|
+
function: "validate_cycles_overlap",
|
|
31
31
|
level: "error",
|
|
32
|
-
message: "must be
|
|
32
|
+
message: "management date must be before cycle start date"
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
|
-
function: "
|
|
35
|
+
function: "validate_functionalUnit_not_1_ha",
|
|
36
36
|
level: "error",
|
|
37
|
-
message: "must
|
|
37
|
+
message: "must not be equal to 1 ha"
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
|
-
function: "
|
|
40
|
+
function: "validate_sum_aboveGroundCropResidue",
|
|
41
41
|
level: "error",
|
|
42
|
-
message: "must
|
|
42
|
+
message: "must be more than or equal to other crop residues"
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
|
-
function: "
|
|
45
|
+
function: "validate_crop_residue_complete",
|
|
46
46
|
level: "error",
|
|
47
|
-
message: "must
|
|
47
|
+
message: "must specify the fate of cropResidue"
|
|
48
48
|
},
|
|
49
49
|
{
|
|
50
|
-
function: "
|
|
50
|
+
function: "validate_crop_residue_incomplete",
|
|
51
|
+
level: "warning",
|
|
52
|
+
message: "should specify the fate of cropResidue"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
function: "validate_cycleDuration",
|
|
51
56
|
level: "error",
|
|
52
|
-
message: "must be
|
|
57
|
+
message: "must be one year prior to endDate"
|
|
53
58
|
},
|
|
54
59
|
{
|
|
55
|
-
function: "
|
|
60
|
+
function: "validate_cycleDuration",
|
|
56
61
|
level: "error",
|
|
57
|
-
message: "must
|
|
62
|
+
message: "must equal to endDate - startDate in days"
|
|
58
63
|
},
|
|
59
64
|
{
|
|
60
|
-
function: "
|
|
65
|
+
function: "validate_harvestedArea",
|
|
61
66
|
level: "error",
|
|
62
|
-
message: "must be
|
|
67
|
+
message: "must be lower or equal to siteArea"
|
|
63
68
|
},
|
|
64
69
|
{
|
|
65
|
-
function: "
|
|
66
|
-
level: "
|
|
67
|
-
message: "
|
|
70
|
+
function: "validate_maximum_cycleDuration",
|
|
71
|
+
level: "error",
|
|
72
|
+
message: "must be below maximum cycleDuration"
|
|
68
73
|
},
|
|
69
74
|
{
|
|
70
|
-
function: "
|
|
75
|
+
function: "validate_riceGrainInHuskFlooded_minimum_cycleDuration",
|
|
71
76
|
level: "warning",
|
|
72
|
-
message: "
|
|
77
|
+
message: "should be more than the cropping duration"
|
|
73
78
|
},
|
|
74
79
|
{
|
|
75
|
-
function: "
|
|
80
|
+
function: "validate_crop_siteDuration",
|
|
76
81
|
level: "error",
|
|
77
|
-
message: "should be
|
|
82
|
+
message: "should be equal to cycleDuration for crop"
|
|
78
83
|
},
|
|
79
84
|
{
|
|
80
|
-
function: "
|
|
85
|
+
function: "validate_crop_siteDuration",
|
|
81
86
|
level: "error",
|
|
82
|
-
message: "should
|
|
87
|
+
message: "should be greater than cycleDuration for crop"
|
|
83
88
|
},
|
|
84
89
|
{
|
|
85
|
-
function: "
|
|
90
|
+
function: "validate_animal_siteDuration",
|
|
86
91
|
level: "error",
|
|
87
|
-
message: "
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
function: "validate_list_has_properties",
|
|
91
|
-
level: "warning",
|
|
92
|
-
message: "should add missing properties"
|
|
92
|
+
message: "should be equal to cycleDuration for animals"
|
|
93
93
|
},
|
|
94
94
|
{
|
|
95
|
-
function: "
|
|
95
|
+
function: "validate_animal_siteDuration",
|
|
96
96
|
level: "error",
|
|
97
|
-
message: "
|
|
97
|
+
message: "should be equal to cycleDuration - otherSitesDuration for animals"
|
|
98
98
|
},
|
|
99
99
|
{
|
|
100
|
-
function: "
|
|
100
|
+
function: "validate_animal_siteDuration",
|
|
101
101
|
level: "error",
|
|
102
|
-
message: "
|
|
102
|
+
message: "should be less than cycleDuration for animals"
|
|
103
103
|
},
|
|
104
104
|
{
|
|
105
|
-
function: "
|
|
106
|
-
level: "
|
|
107
|
-
message: "
|
|
105
|
+
function: "validate_durations",
|
|
106
|
+
level: "warning",
|
|
107
|
+
message: "should add the fields for a relative cycle"
|
|
108
108
|
},
|
|
109
109
|
{
|
|
110
|
-
function: "
|
|
110
|
+
function: "validate_possibleCoverCrop",
|
|
111
111
|
level: "error",
|
|
112
|
-
message: "
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
function: "validate_area",
|
|
116
|
-
level: "warning",
|
|
117
|
-
message: "should be equal to boundary"
|
|
112
|
+
message: "cover crop cycle contains non cover crop product"
|
|
118
113
|
},
|
|
119
114
|
{
|
|
120
|
-
function: "
|
|
115
|
+
function: "validate_set_treatment",
|
|
121
116
|
level: "warning",
|
|
122
|
-
message: "
|
|
117
|
+
message: "should specify a treatment when experimentDesign is specified"
|
|
123
118
|
},
|
|
124
119
|
{
|
|
125
|
-
function: "
|
|
120
|
+
function: "validate_products_animals",
|
|
126
121
|
level: "warning",
|
|
127
|
-
message: "should
|
|
122
|
+
message: "should not specify both liveAnimal and animalProduct"
|
|
128
123
|
},
|
|
129
124
|
{
|
|
130
|
-
function: "
|
|
125
|
+
function: "validate_stocking_density",
|
|
131
126
|
level: "warning",
|
|
132
|
-
message: "
|
|
127
|
+
message: "should add the term stockingDensityPermanentPastureAverage"
|
|
133
128
|
},
|
|
134
129
|
{
|
|
135
|
-
function: "
|
|
130
|
+
function: "validate_linked_impact_assessment",
|
|
136
131
|
level: "error",
|
|
137
|
-
message: "
|
|
132
|
+
message: "multiple ImpactAssessment are associated with this Product"
|
|
138
133
|
},
|
|
139
134
|
{
|
|
140
|
-
function: "
|
|
141
|
-
level: "
|
|
142
|
-
message: "
|
|
135
|
+
function: "validate_linked_impact_assessment",
|
|
136
|
+
level: "error",
|
|
137
|
+
message: "no ImpactAssessment are associated with this Product"
|
|
143
138
|
},
|
|
144
139
|
{
|
|
145
|
-
function: "
|
|
140
|
+
function: "validate_animal_product_mapping",
|
|
146
141
|
level: "error",
|
|
147
|
-
message: "
|
|
142
|
+
message: "is not an allowed animalProduct"
|
|
148
143
|
},
|
|
149
144
|
{
|
|
150
|
-
function: "
|
|
151
|
-
level: "
|
|
152
|
-
message: "
|
|
145
|
+
function: "validate_requires_substrate",
|
|
146
|
+
level: "error",
|
|
147
|
+
message: "must add substrate inputs"
|
|
153
148
|
},
|
|
154
149
|
{
|
|
155
|
-
function: "
|
|
150
|
+
function: "_validate_previous_transformationId",
|
|
156
151
|
level: "error",
|
|
157
|
-
message: "
|
|
152
|
+
message: "must point to a previous transformation in the list"
|
|
158
153
|
},
|
|
159
154
|
{
|
|
160
|
-
function: "
|
|
161
|
-
level: "
|
|
162
|
-
message: "
|
|
155
|
+
function: "_validate_previous_input",
|
|
156
|
+
level: "error",
|
|
157
|
+
message: "at least one Input must be a Product of the Cycle"
|
|
163
158
|
},
|
|
164
159
|
{
|
|
165
|
-
function: "
|
|
166
|
-
level: "
|
|
167
|
-
message: "
|
|
160
|
+
function: "_validate_previous_input",
|
|
161
|
+
level: "error",
|
|
162
|
+
message: "at least one Input must be a Product of the previous Transformation"
|
|
168
163
|
},
|
|
169
164
|
{
|
|
170
|
-
function: "
|
|
165
|
+
function: "_validate_previous_product_value",
|
|
171
166
|
level: "error",
|
|
172
|
-
message: "must equal to
|
|
167
|
+
message: "must be equal to previous product multiplied by the share"
|
|
173
168
|
},
|
|
174
169
|
{
|
|
175
|
-
function: "
|
|
170
|
+
function: "validate_linked_emission",
|
|
176
171
|
level: "warning",
|
|
177
|
-
message: "should
|
|
172
|
+
message: "should be linked to an emission in the Cycle"
|
|
178
173
|
},
|
|
179
174
|
{
|
|
180
|
-
function: "
|
|
181
|
-
level: "
|
|
182
|
-
message: "
|
|
175
|
+
function: "validate_excreta_inputs_products",
|
|
176
|
+
level: "error",
|
|
177
|
+
message: "must be included as an Input"
|
|
183
178
|
},
|
|
184
179
|
{
|
|
185
|
-
function: "
|
|
186
|
-
level: "
|
|
187
|
-
message: "
|
|
180
|
+
function: "validate_transformation_inputs_value",
|
|
181
|
+
level: "error",
|
|
182
|
+
message: "must be specified for multiple Inputs with the same term"
|
|
188
183
|
},
|
|
189
184
|
{
|
|
190
|
-
function: "
|
|
185
|
+
function: "validate_empty",
|
|
191
186
|
level: "error",
|
|
192
|
-
message: "
|
|
187
|
+
message: "should not be empty"
|
|
193
188
|
},
|
|
194
189
|
{
|
|
195
|
-
function: "
|
|
190
|
+
function: "validate_linked_cycle_product",
|
|
196
191
|
level: "error",
|
|
197
|
-
message: "
|
|
192
|
+
message: "should be included in the cycle products"
|
|
198
193
|
},
|
|
199
194
|
{
|
|
200
|
-
function: "
|
|
195
|
+
function: "validate_linked_cycle_endDate",
|
|
196
|
+
level: "error",
|
|
197
|
+
message: "must be equal to the Cycle endDate"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
function: "validate_value_follows_area",
|
|
201
201
|
level: "warning",
|
|
202
|
-
message: "should
|
|
202
|
+
message: "should not be proportional to the site area"
|
|
203
203
|
},
|
|
204
204
|
{
|
|
205
|
-
function: "
|
|
205
|
+
function: "validate_fixed_nutrient_ratio",
|
|
206
206
|
level: "warning",
|
|
207
|
-
message: "should
|
|
207
|
+
message: "should be the amount of nutrient, not of fertiliser"
|
|
208
208
|
},
|
|
209
209
|
{
|
|
210
|
-
function: "
|
|
210
|
+
function: "validate_lifespan",
|
|
211
211
|
level: "error",
|
|
212
|
-
message: "
|
|
212
|
+
message: "must equal to endDate - startDate in decimal years"
|
|
213
213
|
},
|
|
214
214
|
{
|
|
215
|
-
function: "
|
|
216
|
-
level: "
|
|
217
|
-
message: "
|
|
215
|
+
function: "validate_functionalArea",
|
|
216
|
+
level: "warning",
|
|
217
|
+
message: "should specify functionalArea or site area"
|
|
218
218
|
},
|
|
219
219
|
{
|
|
220
|
-
function: "
|
|
220
|
+
function: "validate_soilTexture",
|
|
221
221
|
level: "error",
|
|
222
|
-
message: "
|
|
222
|
+
message: "is outside the allowed range"
|
|
223
223
|
},
|
|
224
224
|
{
|
|
225
|
-
function: "
|
|
225
|
+
function: "validate_soilTexture_depths",
|
|
226
226
|
level: "warning",
|
|
227
|
-
message: "
|
|
227
|
+
message: "should be given at the same depths as the soil content"
|
|
228
228
|
},
|
|
229
229
|
{
|
|
230
|
-
function: "
|
|
230
|
+
function: "validate_depths",
|
|
231
231
|
level: "error",
|
|
232
|
-
message: "
|
|
232
|
+
message: "must be greater than or equal to depthUpper"
|
|
233
233
|
},
|
|
234
234
|
{
|
|
235
|
-
function: "
|
|
235
|
+
function: "validate_required_depths",
|
|
236
236
|
level: "error",
|
|
237
|
-
message: "
|
|
237
|
+
message: "must set both depthUpper and depthLower"
|
|
238
238
|
},
|
|
239
239
|
{
|
|
240
|
-
function: "
|
|
240
|
+
function: "validate_required_depths",
|
|
241
241
|
level: "warning",
|
|
242
|
-
message: "should
|
|
242
|
+
message: "should set both depthUpper and depthLower"
|
|
243
243
|
},
|
|
244
244
|
{
|
|
245
|
-
function: "
|
|
245
|
+
function: "validate_term_unique",
|
|
246
246
|
level: "error",
|
|
247
|
-
message: "
|
|
247
|
+
message: "must be unique"
|
|
248
248
|
},
|
|
249
249
|
{
|
|
250
|
-
function: "
|
|
250
|
+
function: "validate_term_unique",
|
|
251
251
|
level: "error",
|
|
252
|
-
message: "
|
|
253
|
-
},
|
|
254
|
-
{
|
|
255
|
-
function: "validate_liveAnimal_system",
|
|
256
|
-
level: "warning",
|
|
257
|
-
message: "should add an animal production system"
|
|
252
|
+
message: "must provide value or min and max"
|
|
258
253
|
},
|
|
259
254
|
{
|
|
260
|
-
function: "
|
|
255
|
+
function: "validate_with_models",
|
|
261
256
|
level: "warning",
|
|
262
|
-
message: "
|
|
257
|
+
message: "the measurement provided might be in error"
|
|
263
258
|
},
|
|
264
259
|
{
|
|
265
|
-
function: "
|
|
260
|
+
function: "validate_value_length",
|
|
266
261
|
level: "error",
|
|
267
|
-
message: "
|
|
262
|
+
message: "must not contain more than 1 value"
|
|
268
263
|
},
|
|
269
264
|
{
|
|
270
|
-
function: "
|
|
265
|
+
function: "validate_water_measurements",
|
|
271
266
|
level: "error",
|
|
272
|
-
message: "
|
|
267
|
+
message: "must specify water type for ponds"
|
|
273
268
|
},
|
|
274
269
|
{
|
|
275
|
-
function: "
|
|
270
|
+
function: "validate_water_salinity",
|
|
276
271
|
level: "error",
|
|
277
|
-
message: "
|
|
272
|
+
message: "invalid water salinity"
|
|
278
273
|
},
|
|
279
274
|
{
|
|
280
|
-
function: "
|
|
275
|
+
function: "validate_soil_type_consistency",
|
|
281
276
|
level: "error",
|
|
282
|
-
message: "
|
|
277
|
+
message: "measurements for the same termType must be consistent"
|
|
283
278
|
},
|
|
284
279
|
{
|
|
285
|
-
function: "
|
|
286
|
-
level: "
|
|
287
|
-
message: "
|
|
280
|
+
function: "validate_must_include_id",
|
|
281
|
+
level: "warning",
|
|
282
|
+
message: "should add missing inputs"
|
|
288
283
|
},
|
|
289
284
|
{
|
|
290
|
-
function: "
|
|
291
|
-
level: "
|
|
292
|
-
message: "
|
|
285
|
+
function: "validate_compound_fertiliser_composition",
|
|
286
|
+
level: "warning",
|
|
287
|
+
message: "should match the nutrient ratio of the compound fertiliser"
|
|
293
288
|
},
|
|
294
289
|
{
|
|
295
|
-
function: "
|
|
290
|
+
function: "validate_related_impacts",
|
|
296
291
|
level: "error",
|
|
297
|
-
message: "
|
|
292
|
+
message: "can not be linked to the same type"
|
|
298
293
|
},
|
|
299
294
|
{
|
|
300
|
-
function: "
|
|
295
|
+
function: "validate_related_impact_product",
|
|
301
296
|
level: "error",
|
|
302
|
-
message: "
|
|
297
|
+
message: "can not be linked to a different term"
|
|
303
298
|
},
|
|
304
299
|
{
|
|
305
|
-
function: "
|
|
306
|
-
level: "
|
|
307
|
-
message: "
|
|
300
|
+
function: "_validate_input_value",
|
|
301
|
+
level: "warning",
|
|
302
|
+
message: "is outside confidence interval"
|
|
308
303
|
},
|
|
309
304
|
{
|
|
310
|
-
function: "
|
|
305
|
+
function: "validate_animalFeed_requires_isAnimalFeed",
|
|
311
306
|
level: "error",
|
|
312
|
-
message: "
|
|
307
|
+
message: "must specify is it an animal feed"
|
|
313
308
|
},
|
|
314
309
|
{
|
|
315
|
-
function: "
|
|
310
|
+
function: "validate_isAnimalFeed_animal_cycle",
|
|
316
311
|
level: "error",
|
|
317
|
-
message: "
|
|
312
|
+
message: "isAnimalFeed not allowed on a non-animal cycle"
|
|
318
313
|
},
|
|
319
314
|
{
|
|
320
|
-
function: "
|
|
315
|
+
function: "validate_saplings",
|
|
321
316
|
level: "error",
|
|
322
|
-
message: "
|
|
323
|
-
},
|
|
324
|
-
{
|
|
325
|
-
function: "validate_irrigating_operation_rainfed_water_regime",
|
|
326
|
-
level: "warning",
|
|
327
|
-
message: "should use irrigated water regime"
|
|
317
|
+
message: "saplings cannot be used as an input here"
|
|
328
318
|
},
|
|
329
319
|
{
|
|
330
|
-
function: "
|
|
320
|
+
function: "validate_seed",
|
|
331
321
|
level: "error",
|
|
332
|
-
message: "
|
|
322
|
+
message: "seed cannot be used as an input here"
|
|
333
323
|
},
|
|
334
324
|
{
|
|
335
|
-
function: "
|
|
325
|
+
function: "validate_saplings_depreciated",
|
|
336
326
|
level: "error",
|
|
337
|
-
message: "
|
|
327
|
+
message: "saplingsDepreciatedAmountPerCycle cannot be used as an input here"
|
|
338
328
|
},
|
|
339
329
|
{
|
|
340
|
-
function: "
|
|
341
|
-
level: "
|
|
342
|
-
message: "
|
|
330
|
+
function: "validate_seed_correspondingSpecies",
|
|
331
|
+
level: "error",
|
|
332
|
+
message: "must specify correspondingSpecies in intercropping"
|
|
343
333
|
},
|
|
344
334
|
{
|
|
345
|
-
function: "
|
|
335
|
+
function: "validate_material_depreciated",
|
|
346
336
|
level: "error",
|
|
347
|
-
message: "must
|
|
337
|
+
message: "must use the depreciated term"
|
|
348
338
|
},
|
|
349
339
|
{
|
|
350
|
-
function: "
|
|
340
|
+
function: "validate_input_is_product",
|
|
351
341
|
level: "error",
|
|
352
|
-
message: "must
|
|
342
|
+
message: "must be a product"
|
|
353
343
|
},
|
|
354
344
|
{
|
|
355
|
-
function: "
|
|
345
|
+
function: "validate_input_unspecified_term",
|
|
356
346
|
level: "warning",
|
|
357
|
-
message: "should
|
|
358
|
-
},
|
|
359
|
-
{
|
|
360
|
-
function: "validate_term_unique",
|
|
361
|
-
level: "error",
|
|
362
|
-
message: "must be unique"
|
|
347
|
+
message: "should use a specific term"
|
|
363
348
|
},
|
|
364
349
|
{
|
|
365
|
-
function: "
|
|
366
|
-
level: "
|
|
367
|
-
message: "
|
|
350
|
+
function: "validate_method_not_relevant",
|
|
351
|
+
level: "warning",
|
|
352
|
+
message: "should not use not relevant model"
|
|
368
353
|
},
|
|
369
354
|
{
|
|
370
|
-
function: "
|
|
355
|
+
function: "validate_methodTier_not_relevant",
|
|
371
356
|
level: "warning",
|
|
372
|
-
message: "
|
|
357
|
+
message: "should not use not relevant methodTier"
|
|
373
358
|
},
|
|
374
359
|
{
|
|
375
|
-
function: "
|
|
360
|
+
function: "validate_methodTier_background",
|
|
376
361
|
level: "error",
|
|
377
|
-
message: "must not
|
|
362
|
+
message: "must not have background methodTier"
|
|
378
363
|
},
|
|
379
364
|
{
|
|
380
|
-
function: "
|
|
365
|
+
function: "validate_methodTier_background",
|
|
381
366
|
level: "error",
|
|
382
|
-
message: "must
|
|
367
|
+
message: "must be an existing term"
|
|
383
368
|
},
|
|
384
369
|
{
|
|
385
|
-
function: "
|
|
370
|
+
function: "validate_depth",
|
|
371
|
+
level: "warning",
|
|
372
|
+
message: "should set the depth"
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
function: "validate_linked_impactAssessment",
|
|
386
376
|
level: "error",
|
|
387
|
-
message: "
|
|
377
|
+
message: "must be linked to a verified country-level Impact Assessment"
|
|
388
378
|
},
|
|
389
379
|
{
|
|
390
|
-
function: "
|
|
380
|
+
function: "validate_plantation_practices",
|
|
391
381
|
level: "error",
|
|
392
|
-
message: "
|
|
382
|
+
message: "must include practices for plantation weighting"
|
|
393
383
|
},
|
|
394
384
|
{
|
|
395
385
|
function: "validate_characterisedIndicator_model",
|
|
@@ -417,134 +407,154 @@ var validations = [
|
|
|
417
407
|
message: "this field is required"
|
|
418
408
|
},
|
|
419
409
|
{
|
|
420
|
-
function: "
|
|
421
|
-
level: "
|
|
422
|
-
message: "should
|
|
410
|
+
function: "validate_has_animals",
|
|
411
|
+
level: "warning",
|
|
412
|
+
message: "should specify the herd composition"
|
|
423
413
|
},
|
|
424
414
|
{
|
|
425
|
-
function: "
|
|
415
|
+
function: "validate_duplicated_feed_inputs",
|
|
426
416
|
level: "error",
|
|
427
|
-
message: "
|
|
417
|
+
message: "must not add the feed input to the Cycle as well"
|
|
428
418
|
},
|
|
429
419
|
{
|
|
430
|
-
function: "
|
|
431
|
-
level: "
|
|
432
|
-
message: "
|
|
420
|
+
function: "validate_has_milkYieldPractice",
|
|
421
|
+
level: "warning",
|
|
422
|
+
message: "should specify the a milkYield practice"
|
|
433
423
|
},
|
|
434
424
|
{
|
|
435
|
-
function: "
|
|
425
|
+
function: "validate_animal_has_recommended_products",
|
|
426
|
+
level: "warning",
|
|
427
|
+
message: "should specify a recommended product"
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
function: "validate_defaultValue",
|
|
431
|
+
level: "warning",
|
|
432
|
+
message: "should specify a value when HESTIA has a default one"
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
function: "validate_longFallowDuration",
|
|
436
436
|
level: "error",
|
|
437
|
-
message: "must
|
|
437
|
+
message: "longFallowDuration must be lower than 5 years"
|
|
438
438
|
},
|
|
439
439
|
{
|
|
440
|
-
function: "
|
|
440
|
+
function: "validate_plantationLifespan",
|
|
441
441
|
level: "error",
|
|
442
|
-
message: "must be
|
|
442
|
+
message: "must be greater than or equal to plantationProductiveLifespan"
|
|
443
443
|
},
|
|
444
444
|
{
|
|
445
|
-
function: "
|
|
445
|
+
function: "validate_waterRegime_rice_products",
|
|
446
446
|
level: "error",
|
|
447
|
-
message: "
|
|
447
|
+
message: "rice products not allowed for this water regime practice"
|
|
448
448
|
},
|
|
449
449
|
{
|
|
450
|
-
function: "
|
|
450
|
+
function: "validate_croppingDuration_riceGrainInHuskFlooded",
|
|
451
451
|
level: "warning",
|
|
452
|
-
message: "
|
|
452
|
+
message: "croppingDuration must be between min and max"
|
|
453
453
|
},
|
|
454
454
|
{
|
|
455
|
-
function: "
|
|
455
|
+
function: "validate_excretaManagement",
|
|
456
456
|
level: "error",
|
|
457
|
-
message: "
|
|
457
|
+
message: "an excreta input is required when using an excretaManagement practice"
|
|
458
458
|
},
|
|
459
459
|
{
|
|
460
|
-
function: "
|
|
460
|
+
function: "validate_no_tillage",
|
|
461
461
|
level: "error",
|
|
462
|
-
message: "
|
|
462
|
+
message: "is not allowed in combination with noTillage"
|
|
463
463
|
},
|
|
464
464
|
{
|
|
465
|
-
function: "
|
|
465
|
+
function: "validate_tillage_site_type",
|
|
466
|
+
level: "warning",
|
|
467
|
+
message: "should contain a tillage practice"
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
function: "validate_tillage_values",
|
|
466
471
|
level: "error",
|
|
467
|
-
message: "
|
|
472
|
+
message: "cannot use no tillage if depth or number of tillages is not 0"
|
|
468
473
|
},
|
|
469
474
|
{
|
|
470
|
-
function: "
|
|
475
|
+
function: "validate_tillage_values",
|
|
471
476
|
level: "error",
|
|
472
|
-
message: "
|
|
477
|
+
message: "cannot use full tillage if depth or number of tillages is 0"
|
|
473
478
|
},
|
|
474
479
|
{
|
|
475
|
-
function: "
|
|
480
|
+
function: "validate_liveAnimal_system",
|
|
476
481
|
level: "warning",
|
|
477
|
-
message: "should
|
|
482
|
+
message: "should add an animal production system"
|
|
478
483
|
},
|
|
479
484
|
{
|
|
480
|
-
function: "
|
|
481
|
-
level: "
|
|
482
|
-
message: "should
|
|
485
|
+
function: "validate_has_pastureGrass",
|
|
486
|
+
level: "warning",
|
|
487
|
+
message: "should add the term pastureGrass"
|
|
483
488
|
},
|
|
484
489
|
{
|
|
485
|
-
function: "
|
|
490
|
+
function: "validate_pastureGrass_key_termType",
|
|
486
491
|
level: "error",
|
|
487
|
-
message: "
|
|
492
|
+
message: "pastureGrass key termType must be landCover"
|
|
488
493
|
},
|
|
489
494
|
{
|
|
490
|
-
function: "
|
|
495
|
+
function: "validate_pastureGrass_key_value",
|
|
491
496
|
level: "error",
|
|
492
|
-
message: "
|
|
497
|
+
message: "all values must be numbers"
|
|
493
498
|
},
|
|
494
499
|
{
|
|
495
|
-
function: "
|
|
500
|
+
function: "validate_pastureGrass_key_value",
|
|
496
501
|
level: "error",
|
|
497
|
-
message: "
|
|
502
|
+
message: "the sum of all pastureGrass values must be 100"
|
|
498
503
|
},
|
|
499
504
|
{
|
|
500
|
-
function: "
|
|
505
|
+
function: "validate_permanent_crop_productive_phase",
|
|
501
506
|
level: "error",
|
|
502
|
-
message: "
|
|
507
|
+
message: "must add the term productivePhasePermanentCrops"
|
|
503
508
|
},
|
|
504
509
|
{
|
|
505
|
-
function: "
|
|
506
|
-
level: "
|
|
507
|
-
message: "
|
|
510
|
+
function: "validate_primaryPercent",
|
|
511
|
+
level: "error",
|
|
512
|
+
message: "primaryPercent not allowed on this siteType"
|
|
508
513
|
},
|
|
509
514
|
{
|
|
510
|
-
function: "
|
|
515
|
+
function: "validate_primaryPercent",
|
|
511
516
|
level: "error",
|
|
512
|
-
message: "
|
|
517
|
+
message: "primaryPercent not allowed on this practice"
|
|
513
518
|
},
|
|
514
519
|
{
|
|
515
|
-
function: "
|
|
516
|
-
level: "
|
|
517
|
-
message: "
|
|
520
|
+
function: "validate_processing_operation",
|
|
521
|
+
level: "error",
|
|
522
|
+
message: "must have a primary processing operation"
|
|
518
523
|
},
|
|
519
524
|
{
|
|
520
|
-
function: "
|
|
521
|
-
level: "
|
|
522
|
-
message: "
|
|
525
|
+
function: "validate_landCover_match_products",
|
|
526
|
+
level: "error",
|
|
527
|
+
message: "at least one landCover practice must match an equivalent product"
|
|
523
528
|
},
|
|
524
529
|
{
|
|
525
|
-
function: "
|
|
526
|
-
level: "
|
|
527
|
-
message: "
|
|
530
|
+
function: "validate_coverCrop_landCover_primary_product",
|
|
531
|
+
level: "error",
|
|
532
|
+
message: "a cover crop can not be the land cover of the primary product"
|
|
528
533
|
},
|
|
529
534
|
{
|
|
530
|
-
function: "
|
|
535
|
+
function: "validate_practices_management",
|
|
531
536
|
level: "error",
|
|
532
|
-
message: "
|
|
537
|
+
message: "should match the site management node value"
|
|
533
538
|
},
|
|
534
539
|
{
|
|
535
|
-
function: "
|
|
540
|
+
function: "validate_irrigated_complete_has_inputs",
|
|
536
541
|
level: "error",
|
|
537
|
-
message: "
|
|
542
|
+
message: "must contain water inputs"
|
|
538
543
|
},
|
|
539
544
|
{
|
|
540
|
-
function: "
|
|
545
|
+
function: "validate_rainfed_water_inputs",
|
|
541
546
|
level: "error",
|
|
542
|
-
message: "
|
|
547
|
+
message: "must not set rainfed with water inputs"
|
|
548
|
+
},
|
|
549
|
+
{
|
|
550
|
+
function: "validate_irrigating_operation_rainfed_water_regime",
|
|
551
|
+
level: "warning",
|
|
552
|
+
message: "should use irrigated water regime"
|
|
543
553
|
},
|
|
544
554
|
{
|
|
545
|
-
function: "
|
|
555
|
+
function: "validate_cropResidueManagement_products",
|
|
546
556
|
level: "error",
|
|
547
|
-
message: "
|
|
557
|
+
message: "cropResidue product is not accounted for by the cropResidueManagement practices"
|
|
548
558
|
},
|
|
549
559
|
{
|
|
550
560
|
function: "validate_property_valueType",
|
|
@@ -562,259 +572,264 @@ var validations = [
|
|
|
562
572
|
message: "should be within percentage of default value"
|
|
563
573
|
},
|
|
564
574
|
{
|
|
565
|
-
function: "
|
|
575
|
+
function: "validate_date_lt_today",
|
|
566
576
|
level: "error",
|
|
567
|
-
message: "
|
|
577
|
+
message: "must be before today"
|
|
568
578
|
},
|
|
569
579
|
{
|
|
570
|
-
function: "
|
|
571
|
-
level: "
|
|
572
|
-
message: "
|
|
580
|
+
function: "validate_node_dates",
|
|
581
|
+
level: "error",
|
|
582
|
+
message: "must be greater than startDate"
|
|
573
583
|
},
|
|
574
584
|
{
|
|
575
|
-
function: "
|
|
585
|
+
function: "validate_node_dates",
|
|
576
586
|
level: "error",
|
|
577
|
-
message: "
|
|
587
|
+
message: "must be in the same format as endDate"
|
|
578
588
|
},
|
|
579
589
|
{
|
|
580
|
-
function: "
|
|
590
|
+
function: "validate_list_dates",
|
|
581
591
|
level: "error",
|
|
582
|
-
message: "
|
|
592
|
+
message: "must be greater than startDate"
|
|
583
593
|
},
|
|
584
594
|
{
|
|
585
|
-
function: "
|
|
595
|
+
function: "validate_list_dates_format",
|
|
586
596
|
level: "error",
|
|
587
|
-
message: "
|
|
597
|
+
message: "must have the same length as endDate"
|
|
588
598
|
},
|
|
589
599
|
{
|
|
590
|
-
function: "
|
|
600
|
+
function: "validate_list_dates_length",
|
|
591
601
|
level: "error",
|
|
592
|
-
message: "must
|
|
602
|
+
message: "must contain as many items as values"
|
|
593
603
|
},
|
|
594
604
|
{
|
|
595
|
-
function: "
|
|
596
|
-
level: "
|
|
597
|
-
message: "
|
|
605
|
+
function: "validate_list_value_between_min_max",
|
|
606
|
+
level: "error",
|
|
607
|
+
message: "must be between min and max"
|
|
598
608
|
},
|
|
599
609
|
{
|
|
600
|
-
function: "
|
|
601
|
-
level: "
|
|
602
|
-
message: "
|
|
610
|
+
function: "validate_list_min_below_max",
|
|
611
|
+
level: "error",
|
|
612
|
+
message: "must be greater than min"
|
|
603
613
|
},
|
|
604
614
|
{
|
|
605
|
-
function: "
|
|
615
|
+
function: "validate_list_min_max_lookup",
|
|
606
616
|
level: "error",
|
|
607
|
-
message: "
|
|
617
|
+
message: "must be above the minimum"
|
|
608
618
|
},
|
|
609
619
|
{
|
|
610
|
-
function: "
|
|
620
|
+
function: "validate_list_min_max_lookup",
|
|
611
621
|
level: "error",
|
|
612
|
-
message: "
|
|
622
|
+
message: "must be below the maximum"
|
|
613
623
|
},
|
|
614
624
|
{
|
|
615
|
-
function: "
|
|
625
|
+
function: "validate_region_list_value_diff_property_lookup",
|
|
616
626
|
level: "warning",
|
|
617
|
-
message: "should
|
|
627
|
+
message: "should be within acceptable range of the lookup value"
|
|
618
628
|
},
|
|
619
629
|
{
|
|
620
|
-
function: "
|
|
630
|
+
function: "validate_list_term_percent",
|
|
631
|
+
level: "warning",
|
|
632
|
+
message: "may be between 0 and 100"
|
|
633
|
+
},
|
|
634
|
+
{
|
|
635
|
+
function: "validate_list_term_percent",
|
|
621
636
|
level: "error",
|
|
622
|
-
message: "
|
|
637
|
+
message: "should be between 0 and 100 (percentage)"
|
|
623
638
|
},
|
|
624
639
|
{
|
|
625
|
-
function: "
|
|
626
|
-
level: "
|
|
627
|
-
message: "should
|
|
640
|
+
function: "validate_list_percent_requires_value",
|
|
641
|
+
level: "error",
|
|
642
|
+
message: "should have required property 'value'"
|
|
628
643
|
},
|
|
629
644
|
{
|
|
630
|
-
function: "
|
|
631
|
-
level: "
|
|
632
|
-
message: "
|
|
645
|
+
function: "validate_list_valueType",
|
|
646
|
+
level: "error",
|
|
647
|
+
message: "the node value type is incorrect"
|
|
633
648
|
},
|
|
634
649
|
{
|
|
635
|
-
function: "
|
|
650
|
+
function: "validate_list_has_properties",
|
|
636
651
|
level: "warning",
|
|
637
|
-
message: "should add missing
|
|
652
|
+
message: "should add missing properties"
|
|
638
653
|
},
|
|
639
654
|
{
|
|
640
|
-
function: "
|
|
641
|
-
level: "
|
|
642
|
-
message: "
|
|
655
|
+
function: "validate_is_region",
|
|
656
|
+
level: "error",
|
|
657
|
+
message: "must not be a country"
|
|
643
658
|
},
|
|
644
659
|
{
|
|
645
|
-
function: "
|
|
660
|
+
function: "validate_region_in_country",
|
|
646
661
|
level: "error",
|
|
647
|
-
message: "
|
|
662
|
+
message: "must be within the country"
|
|
648
663
|
},
|
|
649
664
|
{
|
|
650
|
-
function: "
|
|
665
|
+
function: "validate_country",
|
|
651
666
|
level: "error",
|
|
652
|
-
message: "
|
|
667
|
+
message: "must be a country"
|
|
653
668
|
},
|
|
654
669
|
{
|
|
655
|
-
function: "
|
|
670
|
+
function: "validate_coordinates",
|
|
671
|
+
level: "error",
|
|
672
|
+
message: "does not contain latitude and longitude"
|
|
673
|
+
},
|
|
674
|
+
{
|
|
675
|
+
function: "validate_area",
|
|
656
676
|
level: "warning",
|
|
657
|
-
message: "
|
|
677
|
+
message: "should be equal to boundary"
|
|
658
678
|
},
|
|
659
679
|
{
|
|
660
|
-
function: "
|
|
661
|
-
level: "
|
|
662
|
-
message: "
|
|
680
|
+
function: "validate_boundary_area",
|
|
681
|
+
level: "warning",
|
|
682
|
+
message: "boundaryArea should be lower than max size"
|
|
663
683
|
},
|
|
664
684
|
{
|
|
665
|
-
function: "
|
|
666
|
-
level: "
|
|
667
|
-
message: "
|
|
685
|
+
function: "validate_region_size",
|
|
686
|
+
level: "warning",
|
|
687
|
+
message: "should be lower than max size"
|
|
668
688
|
},
|
|
669
689
|
{
|
|
670
|
-
function: "
|
|
671
|
-
level: "
|
|
672
|
-
message: "
|
|
690
|
+
function: "validate_empty_fields",
|
|
691
|
+
level: "warning",
|
|
692
|
+
message: "may not be empty"
|
|
673
693
|
},
|
|
674
694
|
{
|
|
675
|
-
function: "
|
|
695
|
+
function: "validate_linked_source_privacy",
|
|
676
696
|
level: "error",
|
|
677
|
-
message: "
|
|
697
|
+
message: "should have the same privacy as the related source"
|
|
678
698
|
},
|
|
679
699
|
{
|
|
680
|
-
function: "
|
|
681
|
-
level: "
|
|
682
|
-
message: "
|
|
700
|
+
function: "validate_private_has_source",
|
|
701
|
+
level: "warning",
|
|
702
|
+
message: "should add a source"
|
|
683
703
|
},
|
|
684
704
|
{
|
|
685
|
-
function: "
|
|
705
|
+
function: "_validate_list_model",
|
|
686
706
|
level: "error",
|
|
687
|
-
message: "
|
|
707
|
+
message: "the value provided is not consistent with the model result"
|
|
688
708
|
},
|
|
689
709
|
{
|
|
690
|
-
function: "
|
|
710
|
+
function: "validate_duplicated_terms",
|
|
711
|
+
level: "warning",
|
|
712
|
+
message: "should not use several terms describing the same product"
|
|
713
|
+
},
|
|
714
|
+
{
|
|
715
|
+
function: "validate_other_model",
|
|
691
716
|
level: "error",
|
|
692
|
-
message: "
|
|
717
|
+
message: "is required when using other model"
|
|
693
718
|
},
|
|
694
719
|
{
|
|
695
|
-
function: "
|
|
720
|
+
function: "validate_nested_existing_node",
|
|
696
721
|
level: "warning",
|
|
697
|
-
message: "should
|
|
722
|
+
message: "should not link to an existing node"
|
|
698
723
|
},
|
|
699
724
|
{
|
|
700
|
-
function: "
|
|
725
|
+
function: "validate_nested_existing_node",
|
|
701
726
|
level: "warning",
|
|
702
|
-
message: "
|
|
727
|
+
message: "should not link to an existing node"
|
|
703
728
|
},
|
|
704
729
|
{
|
|
705
|
-
function: "
|
|
730
|
+
function: "validate_cycle_dates",
|
|
706
731
|
level: "error",
|
|
707
|
-
message: "
|
|
732
|
+
message: "multiple cycles on the same site cannot overlap"
|
|
708
733
|
},
|
|
709
734
|
{
|
|
710
|
-
function: "
|
|
735
|
+
function: "validate_cycles_linked_ia",
|
|
711
736
|
level: "error",
|
|
712
|
-
message: "
|
|
737
|
+
message: "cycles linked together cannot be added to the same site"
|
|
713
738
|
},
|
|
714
739
|
{
|
|
715
|
-
function: "
|
|
740
|
+
function: "validate_economicValueShare",
|
|
716
741
|
level: "error",
|
|
717
|
-
message: "
|
|
742
|
+
message: "economicValueShare should sum to 100 or less across all products"
|
|
718
743
|
},
|
|
719
744
|
{
|
|
720
|
-
function: "
|
|
721
|
-
level: "
|
|
722
|
-
message: "
|
|
745
|
+
function: "validate_value_empty",
|
|
746
|
+
level: "warning",
|
|
747
|
+
message: "may not be 0"
|
|
723
748
|
},
|
|
724
749
|
{
|
|
725
|
-
function: "
|
|
750
|
+
function: "validate_value_0",
|
|
726
751
|
level: "error",
|
|
727
|
-
message: "
|
|
752
|
+
message: "economicValueShare must be 0 for product value 0"
|
|
728
753
|
},
|
|
729
754
|
{
|
|
730
|
-
function: "
|
|
755
|
+
function: "validate_value_0",
|
|
731
756
|
level: "error",
|
|
732
|
-
message: "must
|
|
757
|
+
message: "revenue must be 0 for product value 0"
|
|
733
758
|
},
|
|
734
759
|
{
|
|
735
|
-
function: "
|
|
760
|
+
function: "validate_primary",
|
|
736
761
|
level: "error",
|
|
737
|
-
message: "
|
|
762
|
+
message: "only 1 primary product allowed"
|
|
738
763
|
},
|
|
739
764
|
{
|
|
740
|
-
function: "
|
|
741
|
-
level: "
|
|
742
|
-
message: "
|
|
765
|
+
function: "validate_product_ha_functional_unit_ha",
|
|
766
|
+
level: "error",
|
|
767
|
+
message: "must be below or equal to 1 for unit in ha"
|
|
743
768
|
},
|
|
744
769
|
{
|
|
745
|
-
function: "
|
|
770
|
+
function: "_validate_product_yield",
|
|
746
771
|
level: "warning",
|
|
747
|
-
message: "
|
|
772
|
+
message: "is outside confidence interval"
|
|
748
773
|
},
|
|
749
774
|
{
|
|
750
|
-
function: "
|
|
751
|
-
level: "
|
|
752
|
-
message: "
|
|
775
|
+
function: "validate_excreta_product",
|
|
776
|
+
level: "warning",
|
|
777
|
+
message: "should add an excreta product"
|
|
753
778
|
},
|
|
754
779
|
{
|
|
755
|
-
function: "
|
|
780
|
+
function: "validate_excreta_product",
|
|
756
781
|
level: "error",
|
|
757
|
-
message: "
|
|
782
|
+
message: "is not an allowed excreta product"
|
|
758
783
|
},
|
|
759
784
|
{
|
|
760
|
-
function: "
|
|
785
|
+
function: "validate_requires_water_salinity",
|
|
761
786
|
level: "error",
|
|
762
|
-
message: "
|
|
787
|
+
message: "requires a water salinity measurement"
|
|
763
788
|
},
|
|
764
789
|
{
|
|
765
|
-
function: "
|
|
766
|
-
level: "
|
|
767
|
-
message: "
|
|
790
|
+
function: "_validate_all_values",
|
|
791
|
+
level: "warning",
|
|
792
|
+
message: "may not all be set to false"
|
|
768
793
|
},
|
|
769
794
|
{
|
|
770
|
-
function: "
|
|
795
|
+
function: "_validate_material",
|
|
771
796
|
level: "error",
|
|
772
|
-
message: "must be
|
|
797
|
+
message: "must be set to false when specifying fuel use"
|
|
773
798
|
},
|
|
774
799
|
{
|
|
775
|
-
function: "
|
|
800
|
+
function: "_validate_freshForage",
|
|
776
801
|
level: "error",
|
|
777
|
-
message: "must
|
|
802
|
+
message: "must have inputs representing the forage when set to true"
|
|
778
803
|
},
|
|
779
804
|
{
|
|
780
|
-
function: "
|
|
805
|
+
function: "_validate_ingredient",
|
|
781
806
|
level: "error",
|
|
782
|
-
message: "
|
|
807
|
+
message: "must have inputs to represent ingredients"
|
|
783
808
|
},
|
|
784
809
|
{
|
|
785
|
-
function: "
|
|
810
|
+
function: "_validate_ingredient",
|
|
786
811
|
level: "error",
|
|
787
|
-
message: "
|
|
812
|
+
message: "ingredients should be complete"
|
|
788
813
|
},
|
|
789
814
|
{
|
|
790
|
-
function: "
|
|
815
|
+
function: "_validate_animalPopulation",
|
|
791
816
|
level: "error",
|
|
792
|
-
message: "
|
|
817
|
+
message: "animal population must not be complete"
|
|
793
818
|
},
|
|
794
819
|
{
|
|
795
|
-
function: "
|
|
820
|
+
function: "_validate_completeness_blank_nodes_key",
|
|
796
821
|
level: "error",
|
|
797
|
-
message: "
|
|
822
|
+
message: "must not be blank if complete"
|
|
798
823
|
},
|
|
799
824
|
{
|
|
800
|
-
function: "
|
|
825
|
+
function: "validate_completeness_transport",
|
|
801
826
|
level: "error",
|
|
802
|
-
message: "must
|
|
827
|
+
message: "must have a value or a distance if complete"
|
|
803
828
|
},
|
|
804
829
|
{
|
|
805
|
-
function: "
|
|
830
|
+
function: "validate_coverage",
|
|
806
831
|
level: "warning",
|
|
807
|
-
message: "
|
|
808
|
-
},
|
|
809
|
-
{
|
|
810
|
-
function: "validate_excreta_inputs_products",
|
|
811
|
-
level: "error",
|
|
812
|
-
message: "must be included as an Input"
|
|
813
|
-
},
|
|
814
|
-
{
|
|
815
|
-
function: "validate_transformation_inputs_value",
|
|
816
|
-
level: "error",
|
|
817
|
-
message: "must be specified for multiple Inputs with the same term"
|
|
832
|
+
message: "can not calculate all emissions"
|
|
818
833
|
}
|
|
819
834
|
];
|
|
820
835
|
var validation_default = {
|