Skip to content
This repository has been archived by the owner. It is now read-only.

Need better docs on how to do declarative validation #98

Closed
ebidel opened this issue Nov 12, 2014 · 3 comments
Closed

Need better docs on how to do declarative validation #98

ebidel opened this issue Nov 12, 2014 · 3 comments

Comments

@ebidel
Copy link
Contributor

@ebidel ebidel commented Nov 12, 2014

Took me a while to piece it together. The gist is:

<template is="auto-binding">
  <paper-input-decorator label="Number" floatingLabel
                         error="is not a number" 
                         isInvalid="{{!$.input.validity.valid}}">
  <input id="input" is="core-input" pattern="\d*">
</paper-input-decorator>
</template>

<script>
  CoreStyle.g.paperInput.invalidColor = 'red';
</script>
@wildfiremedia
Copy link

@wildfiremedia wildfiremedia commented Nov 13, 2014

Is there any docs on pattern usages?

@morethanreal
Copy link
Contributor

@morethanreal morethanreal commented Nov 14, 2014

How does 893d76d look?

I also realized that I forgot to add paper-input-decorator docs to index.html :(

@morethanreal morethanreal self-assigned this Dec 12, 2014
@morethanreal
Copy link
Contributor

@morethanreal morethanreal commented Dec 17, 2014

I added autoValidate in 255980d which should make this a lot more straightforward.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.