Validate an input string and supply it to an output if it conforms to the test
- Install bower per their instructions, such as via:
npm install -g bower - Using bower install the package to your project
cd $YOUR_PROJECT_DIR bower install validate-string
You will now find a folder called bower_components in your project root which contains the webcomponents polyfill, and the validate-string element files along with any dependencies required.
<body>
<template is="dom-bind">
<validate-string input="string passes test" accepted-regex='passes' is-valid="{{passValid}}" output="{{pass}}"></validate-string>
<p>First test is valid: [[passValid]]</p><p>First test output: [[pass]]</p>
<validate-string input="string fails test" accepted-regex='passes' is-valid="{{failValid}}" output="{{fail}}"></validate-string>
<p>Second test is valid: [[failValid]]</p><p>Second test output: [[fail]]</p>
</template>
</body>- Fork it!
- Create your feature branch:
git checkout -b my-new-feature - Commit your changes:
git commit -am 'Add some feature' - Push to the branch:
git push origin my-new-feature - Submit a pull request :D
- 0.0.2 Published onto webcomponents.org
- 0.0.1 Initial release published via bower
MIT License
See the LICENSE file in the root folder of this package.