(val)
| 89 | phoneNumber: { |
| 90 | type: DataTypes.STRING, |
| 91 | set(val) { |
| 92 | if (typeof val === 'object' && val !== null) { |
| 93 | val = `00${val.country}${val.area}${val.local}`; |
| 94 | } |
| 95 | if (typeof val === 'string') { |
| 96 | // Canonicalize phone number |
| 97 | val = val.replace(/^\+/, '00').replace(/\(0\)|[\s+/.\-()]/g, ''); |
| 98 | } |
| 99 | this.setDataValue('phoneNumber', val); |
| 100 | } |
| 101 | } |
| 102 | }); |
| 103 |
nothing calls this directly
no test coverage detected