(sectionId, field)
| 446 | } |
| 447 | |
| 448 | function getFieldSchemaForSection(sectionId, field) { |
| 449 | if (!stateCache?.sectionSchemas || typeof stateCache.sectionSchemas !== "object") { |
| 450 | return null; |
| 451 | } |
| 452 | const sectionSchema = stateCache.sectionSchemas[sectionId]; |
| 453 | if (!sectionSchema || typeof sectionSchema !== "object") { |
| 454 | return null; |
| 455 | } |
| 456 | const fieldSchema = sectionSchema[field]; |
| 457 | if (!fieldSchema || typeof fieldSchema !== "object") { |
| 458 | return null; |
| 459 | } |
| 460 | return fieldSchema; |
| 461 | } |
| 462 | |
| 463 | function isValidEmail(value) { |
| 464 | return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value); |
no outgoing calls
no test coverage detected