(value)
| 465 | } |
| 466 | |
| 467 | function isValidUrl(value) { |
| 468 | try { |
| 469 | const url = new URL(value); |
| 470 | return ["http:", "https:"].includes(url.protocol); |
| 471 | } catch { |
| 472 | return false; |
| 473 | } |
| 474 | } |
| 475 | |
| 476 | function validateFieldValue(sectionId, field, value, mark = "draft") { |
| 477 | const schema = getFieldSchemaForSection(sectionId, field); |
no outgoing calls
no test coverage detected