you have few tasks in your main requirement, like how to detect copy past in textarea, check for spaces and length, show alert etc..
try to do one by one, if you google for those small tasks you will find many solutions and sample code in internet. for example
javascript :
Detect pasted text with ctrl+v or right click -> paste[
^]
JQuery:
Capture text pasted into a textarea with JQuery[
^]
check spaces in string using javascript :
JavaScript: Check if a string has white space[
^]
check length of string in javascript?[
^]
Now you can try to implement your requirement with help of above resource. if you still facing problems come again and ask question with the details of what you tried and where you stuck.
Good luck! :-)