16 lines
752 B
TypeScript
16 lines
752 B
TypeScript
import type { FieldHook } from 'payload';
|
||
/**
|
||
* Field validation for the favicon upload: Google rejects favicons under 48×48,
|
||
* so warn the editor at save time if the uploaded icon is too small or not
|
||
* square. This ENFORCES the requirement instead of silently shipping a favicon
|
||
* Google won't display.
|
||
*
|
||
* Attach to the favicon field's validate (or as a beforeValidate hook on the
|
||
* Media relationship). Non-blocking by default — returns a warning string that
|
||
* Payload surfaces; make it throw if you want a hard block.
|
||
*
|
||
* Note: dimensions come from the related Media doc (Payload stores width/height
|
||
* for image uploads), so this checks the resolved upload, not the raw file.
|
||
*/
|
||
export declare const validateFaviconField: FieldHook;
|