2

I am having enrollment form with Almost 30 fields; for validating that form I am using angular My validation is almost done. But having only concern about password and confirm password field.

How Do I prevent user from copy, cut, paste event of password and confirm password field using angular.

1 Answers1

0

i would try a couple of things

1st standard approeach, prevent default behavior and cancel event on any right mouse button mouse down event and do the same for any key downn event with keyCode matching Ctrl or Command key.

2nd other event approach, watch for changes in the input field, ng-change and if the increase is bigger than 1 character, clean the model.

am sure there are other ways, but i think this are among the simplest ones

Dayan Moreno Leon
  • 5,357
  • 2
  • 22
  • 24