Only numbers in TextField

Hi,

How can i just let the user just type number in textfield?

so thanks,

This should do it:

var MyString = "";
function OnGUI(){
	var temp = "";
	for (var c : char in MyString) {
   		if (c >= "0"[0]  c <= "9"[0]) {
      		temp += c;
   			}
		} 
	MyString = GUI.TextField(new Rect(5,5,100,100),temp,30);
	
	}