VBC-117: block-paste
errorCategory: ux-dx
Analysis: Regex (line by line)
File types: .js, .ts, .tsx, .html, .astro
Scope: source code only, ignoring anything inside strings and comments
Tags: ux security
What it reports
Blocking paste in input fields harms both UX and security (password managers).
Flagged
js
input.addEventListener('paste', e => e.preventDefault());Not flagged
js
input.addEventListener('paste', e => normalise(e));Pattern
regex
onPaste=['"]return false['"]|\.addEventListener\(['"]paste['"],.*?\.preventDefault\(