@bagelink/vue 1.9.142 → 1.9.144

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/vue",
3
3
  "type": "module",
4
- "version": "1.9.142",
4
+ "version": "1.9.144",
5
5
  "description": "Bagel core sdk packages",
6
6
  "author": {
7
7
  "name": "Bagel Studio",
@@ -216,6 +216,7 @@ function validateField(key: string, field: FieldBuilder): boolean {
216
216
 
217
217
  if (field._config.required === true) {
218
218
  const isEmpty = value == null || value === '' || (Array.isArray(value) && value.length === 0)
219
+ || (field._type === 'tel' && typeof value === 'string' && /^\+\d+$/.test(value))
219
220
  if (isEmpty) {
220
221
  validationErrors.value = { ...validationErrors.value, [key]: field._config.requiredMessage || $t('form.required') }
221
222
  return false
@@ -358,6 +359,7 @@ function validateAll(): boolean {
358
359
  // Check required fields first
359
360
  if (field._config.required === true) {
360
361
  const isEmpty = value == null || value === '' || (Array.isArray(value) && value.length === 0)
362
+ || (field._type === 'tel' && typeof value === 'string' && /^\+\d+$/.test(value))
361
363
  if (isEmpty) {
362
364
  newErrors[key] = field._config.requiredMessage || $t('form.required')
363
365
  isValid = false