Fill An Input With A Ton Of Text
Last updated
Was this helpful?
Last updated
Was this helpful?
I needed to test out a form validation for an input that should render an error when the length of the context exceeds 10,000 characters. Two small tricks make this easy.
First, you can target any DOM element via the Chrome dev tools by selecting it and then referencing it via the $0
magic variable. .
Second, you can quickly and precisely generate a very long string with the repeat
function.
Combine these two tricks in the browser to fill the input with a ton of text:
h/t Dillon Hafer