Find Type of Form Data -


so i'm not sure how word this. trying validate form data json schema. use dojo create form , fetch it's contents when user clicks submits. data in form returned strings. when schema finds field should number throws error because technically string if input '123'. there way form data while preserving it's primitive type?

array.foreach(formdata, function(item) {     postdata[string(item.title)] = domattr.get(item, "value"); }); 

any ideas?

use parseint() or parsefloat() when validating string. check out here.


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -