(self, field)
| 370 | raise ValidationError(_("Domain not found.")) |
| 371 | |
| 372 | def validate_confirm(self, field): |
| 373 | domain = next( |
| 374 | ( |
| 375 | domain |
| 376 | for domain in self.domains |
| 377 | if domain.id == int(self.domain_id.data) |
| 378 | ), |
| 379 | None, |
| 380 | ) |
| 381 | if not domain: |
| 382 | raise ValidationError(_("Domain not found.")) |
| 383 | if field.data != domain.hostname: |
| 384 | raise ValidationError(_("Domain confirmation did not match.")) |
| 385 | |
| 386 | |
| 387 | class ProjectDomainVerifyForm(StarletteForm): |