I used this code for validate text box when user paste values to the text box.

//Browser Detection
var strUserAgent = navigator.userAgent.toLowerCase(); 
var isIE = strUserAgent.indexOf("msie") > -1; 
var isNS6 = strUserAgent.indexOf("netscape6") > -1; 
var isNS4 = !isIE && !isNS6  && parseFloat(navigator.appVersion) < 5; 


function Paste(objEvent) {
var objInput;
if (isIE) 
{
objInput = objEvent.srcElement; 
}
else 
{
objInput = objEvent.target;
}
if (!/^[A-Za-z0-9\s\£\$]*$/.test(objInput.value)) {
alert("The character you attempted to used is not allowed for this field.");
objInput.value = objInput.validValue || "";
objInput.focus();
objInput.select(); 
} else {
objInput.validValue = objInput.value;
}
}

It works in other characters but if I paste '£', program did not allow to paste it. How can I solove this problem.
Thanks. :cry:

this is the answer,

if (!/^[A-Za-z0-9\s\xA3\$]*$/.test(objInput.value)) {
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.