feat(project-editor): footer validation rules (contact email, social link URLs, payment icons)
Some checks failed
Architecture Governance / architecture (push) Has been cancelled
Some checks failed
Architecture Governance / architecture (push) Has been cancelled
Real gaps, not fabricated: isValidEmail existed in primitives.ts but was never called anywhere; social-link URL check only lived as a per-row template hint (never blocked publish or set the nav badge); payment icons with only src or only alt set were silently accepted. - invalid-contact-email: company.contacts.email must be a valid email (error) - invalid-social-link-url: footer.socialLinks entries need a valid http(s) URL (warning) - incomplete-payment-icon: a payment icon needs both src and alt, or neither (warning) Wired into footer-section via the existing fieldError() pattern. Header has no equivalent gap today (every header field is a bool/enum, always valid by construction) so nothing was added there. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -550,6 +550,9 @@ export const en: Translations = {
|
||||
validationInvalidCss: 'A static page contains invalid CSS.',
|
||||
validationDuplicateRoutes: 'Two or more pages share the same route.',
|
||||
validationInvalidWidgetConfig: 'A widget is missing a required field (id, type, version, or props).',
|
||||
validationInvalidContactEmail: 'The company contact email is not a valid email address.',
|
||||
validationInvalidSocialLinkUrl: 'One or more footer social links have an invalid URL.',
|
||||
validationIncompletePaymentIcon: 'A footer payment icon is missing its image or alt text.',
|
||||
undo: 'Undo',
|
||||
redo: 'Redo',
|
||||
statusDraft: 'Draft',
|
||||
|
||||
@@ -550,6 +550,9 @@ export const hy: Translations = {
|
||||
validationInvalidCss: 'Ստատիկ էջը պարունակում է անվավեր CSS։',
|
||||
validationDuplicateRoutes: 'Երկու կամ ավելի էջ ունեն նույն երթուղին։',
|
||||
validationInvalidWidgetConfig: 'Վիջեթին բացակայում է պարտադիր դաշտ (id, type, version կամ props)։',
|
||||
validationInvalidContactEmail: 'Ընկերության կոնտակտային էլ. փոստը վավեր չէ։',
|
||||
validationInvalidSocialLinkUrl: 'Ֆուտերի սոցիալական հղումներից մեկը կամ մի քանիսը վավեր URL չունեն։',
|
||||
validationIncompletePaymentIcon: 'Ֆուտերի վճարային պատկերակին բացակայում է պատկերը կամ alt տեքստը։',
|
||||
undo: 'Հետարկել',
|
||||
redo: 'Կրկնել',
|
||||
statusDraft: 'Սևագիր',
|
||||
|
||||
@@ -550,6 +550,9 @@ export const ru: Translations = {
|
||||
validationInvalidCss: 'Статическая страница содержит недопустимый CSS.',
|
||||
validationDuplicateRoutes: 'Две или более страницы используют один и тот же маршрут.',
|
||||
validationInvalidWidgetConfig: 'У виджета отсутствует обязательное поле (id, type, version или props).',
|
||||
validationInvalidContactEmail: 'Контактный email компании указан некорректно.',
|
||||
validationInvalidSocialLinkUrl: 'У одной или нескольких социальных ссылок в футере некорректный URL.',
|
||||
validationIncompletePaymentIcon: 'У иконки оплаты в футере отсутствует изображение или альтернативный текст.',
|
||||
undo: 'Отменить',
|
||||
redo: 'Повторить',
|
||||
statusDraft: 'Черновик',
|
||||
|
||||
@@ -548,6 +548,9 @@ export interface Translations {
|
||||
validationInvalidCss: string;
|
||||
validationDuplicateRoutes: string;
|
||||
validationInvalidWidgetConfig: string;
|
||||
validationInvalidContactEmail: string;
|
||||
validationInvalidSocialLinkUrl: string;
|
||||
validationIncompletePaymentIcon: string;
|
||||
undo: string;
|
||||
redo: string;
|
||||
statusDraft: string;
|
||||
|
||||
Reference in New Issue
Block a user