Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input fields always sends a string for an input field, even when field contents are a number. #16

Closed
jondthompson opened this issue Jan 13, 2014 · 2 comments

Comments

@jondthompson
Copy link

So I've got a field bound to an EmberFire object, as specified below:

<label>Page</label>
      {{input type="number" value=model.page classNames="form-control"}}
</div>

I've also got a validate entry on the page field as follows:

"page":{
     ".validate": "newData.isNumber()"
},

I don't have anything special in the controller for the 'page' variable, it just enters it directly into Firebase, and works great if the validate entry isn't in play. However, entry into this field fails, as EmberFire is sending a string of the number, not the actual number.

@anantn
Copy link
Contributor

anantn commented Feb 17, 2014

What is the type of the 'page' attribute on your model?

@jondthompson
Copy link
Author

It's an int, until the user changes it. Then it's still an int until it is sent to Firebase

{ id:"0",text: "0-0", page: 0,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants