> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # Method name: validateSubmission(options: Options, context: Context) # Method package: wixForms # Method menu location: wixForms --> FormSubmission --> validateSubmission # Method Link: https://dev.wix.com/docs/velo/events-service-plugins/forms/service-plugins/form-submission/validate-submission.md # Method Description: Validates a form submission. Validates a site visitor's form submission and returns any validation violations. Site visitors can see the validation violations on their forms. For example, notification messages can appear on the screen. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## Validate a form submission ```javascript const options = { "submission": { "formId": "e9e8c6ff-a771-401b-b46e-82f7c742ef3d" } } export const validateSubmission = async (options, context) => { const messageValidation = options.submission.submissions["long_answer_3524"]; const messageLengthlimit = 200 if (messageValidation.length > messageLengthlimit) { return { errors: [{ errorPath: "long_answer_3524", customErrorMessage: "Message cannot exceed 200 characters!", }] }; } else { return {} } }; ``` ---