I use this code to prevent special characters
String.prototype.isText = function () {return /^[\w\s&'%]*$/.test(this)}
But I want it to allow points to be entered into a string.
How can I change it for this?
thanks
Add a point:
String.prototype.isText = function () {return /^[\w\s&'%.]*$/.test(this)}
String.prototype.isText = function () {return /^[\.\w\s&'%]*$/.test(this)}