@colisweb/rescript-toolkit 2.71.0 → 2.71.1
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/.yarn/install-state.gz
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -140,6 +140,19 @@ let requiredPosFloatTimeHour_Min = (intl, value) => {
|
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
+
let optionalPosFloatTimeHour_Min = (intl, value) => {
|
|
144
|
+
switch value {
|
|
145
|
+
| "" => None
|
|
146
|
+
| v =>
|
|
147
|
+
switch v->Toolkit__Decoders.UnitMeasure.Time.WithUnit.decodeFromString {
|
|
148
|
+
| Ok(#h(_)) => None
|
|
149
|
+
| Ok(#min(_)) => None
|
|
150
|
+
| _ =>
|
|
151
|
+
Some(Intl.formatMessageWithValues(intl, Msg.wrongFormat, {"exemple": "'10 min' '0.5 h'"}))
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
143
156
|
let optionalPosFloatTimeMin = (intl, value) => {
|
|
144
157
|
switch value {
|
|
145
158
|
| "" => None
|