Disable Sitecore Form Client-Side Validation in One Click
> Bookmarklets are amazing

As mentioned in my previous post about form implementation tips, client-side and server-side validation are crucial when implementing Sitecore Forms. Proper testing is also key.
The bookmarklet below disables all client-side validation in one click so that you can quickly test server-side validation.
When to Use This
- During development or debugging of Sitecore Forms and need to bypass client-side validation
- During QA / testing in order to test server-side validation
- During penetration testing to ensure that server-side validation was actually implemented
The Code
What It Does
This bookmarklet specifically targets Sitecore Forms by looking for form elements marked with the data-sc-fxb
attribute:
- Removes
required
attributes from form fields - Strips out
data-val-*
attributes used by jQuery Unobtrusive Validation - Clears existing validation messages from the DOM
- Disables jQuery validation logic if present
How to Add a Bookmarklet
- Copy the code snippet above
- Create a new bookmark in your browser via
CTRL + D
(Windows) orCOMMAND + D
(Mac) - Name it Disable Sitecore Forms Validation
- Locate the newly added bookmark, right click, edit
- Paste the JavaScript snippet into the URL field
- Save
Now, whenever you are on a page with a Sitecore Form, simply click the bookmark and client-side validation will be disabled instantly.
Stay valid (or don't),
MG