Robb Hill
asked on
jquery validate number
I am creating the following html field on the fly in c# code....and trying to validate if its a number or not.
Here is the validate function:
contact.allocation = @"<input type='number' onblur='validateDecimal(this);' pattern='\d + ' step='0.01' value='" + contact.allocationValue + "' placeholder='0.00' id='txtAllocation_" + contact.clientxcontactId + @"'>%</input>";
When I leave the input box the validateDecimal is always telling me to please return a valid number....even if I just put a value like 6 or 6.00Here is the validate function:
function validateDecimal(value) {
if (!($.isNumeric(value)))
Conarc.UI.Messenging.getErrorPopup("Please enter a numeric value for Allocation");
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You are welcome.
ASKER