How to avoid some characters to be inserted in a input ?

How to avoid some characters to be inserted in a input ?

Hi

Can anyone tell me please how can I block some characters to be inserted in my input, for example I don't want the user to insert numbers in a firstname input

Thank you guys!