Make field Readonly or Non editable just by using RegEx

2694 views regex
9

Is it possible to make a field non editable just by using RegEx?

Thank You

answered question

1 Answer

0

Assuming you're talking about HTML, no. Regex simply matches string patterns, and nothing more. It can't prevent someone from editing an input field. It's not the right tool for the job.

You're likely looking for the readonly attribute for an HTML input. https://www.w3schools.com/tags/att_input_readonly.asp

posted this

Have an answer?

JD

Please login first before posting an answer.