Git Product home page Git Product logo

ember-cli-html5-validation's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ember-cli-html5-validation's Issues

custom messages not working for input type='text'

Setting title attribute but not working for input type='text'. It does work for input type='checkbox' however.

{{input type="text" placeholder="Email" valueBinding="email" required='required' title='custom error message'}}

Allow "keydown" validation for individual inputs

It would be nice to achieve instant validation on an input, simply by specifying on the element:

<label for = "username">Username</label>
{{input type="email" valueBinding="username" id="username" placeholder="Username" required="required" autofocus="autofocus" autocomplete="email" validateOn="keydown"}}

Where the validateOn="keydown" denotes that the validation on that individual input should occur whenever the user presses a key while focused on that input.

I am open to other suggestions on how to override this functionality. Feedback appreciated.

isLoading does not disable Async button

From the readme

Note: the async-button component will automatically add the disabled attribute when isValid is false.

Why not also add the disabled attribute when isLoading is true? I want to prevent users from double clicking the submit button and as the async button currently works I can easily send double or triple requests.

My work around is to hookup isValid to a component level method that just sets it to false if isLoading is true but wondering if this could be the default behavior.

Happy to writeup a patch if the behavior is desired.

Form submission will be prevented if any errors are encountered - not working

Have the {{#validatable-form action="save"}} {{/validatable-form}} around my form but not working for me.

I have separate components that are pulled into the form and even tried putting on the actual component. but still form is save and not prevented if not filled in.

Any suggestions. Still trying to learn the workings of ember-cli using version 0.2.5

Change error element to customizable component

While the current implementation works, using a <p> tag, the error message is probably better off as a <label> element, with a for={{inputID}}.

The current implementation also lacks proper aria roles: in this case, the <p> element should have the role="alert" on it, as in the example here.

Perhaps, in the future, you could allow users to override the component template entirely...

I am willing to contribute these accessibility changes, if you approve.

Could not find module `ember-cli-html5-validation/ext/checkbox`

On Ember 1.10 - 1.110-beta.4, and on Ember CLi 0.1.8 - 0.2.0-beta.1 I get

Could not find module `ember-cli-html5-validation/ext/checkbox` imported from `dashboard/initializers/html5-validation`

It's most likely not to be an issue with this addon, rather something with my combination of packages, but I was wondering if anyone else is experiencing the same?

custom radio button not working

this is what I tried, but not working... "required, class, title" for radio buttons in ember-cli
{{#each field.proxiedValues as |val|}}
{{csp-radio
name=field.key
value=val.value
groupValue=field.value
checked=field.value
required=true
class="required"
title="Please select an option"
}}
{{val.label}}
  
{{/each}}

broccoli-uglify-js chokes on backtick from latest merge

Came across this after building with latest rev - 0.17. Rolling back to 0.16 works fine.

Last update is the cause - a25b5e6#diff-b01c322b11fefa66b08bed71afb9e5fbR168

rm -rf dist tmp
ember build --environment=production

Unexpected character '`'
Error at new JS_Parse_Error (/tmp/build_24c9b6c226a8df7be52cd0e61d499141/node_modules/ember-cli-uglify/node_modules/broccoli-uglify-sourcemap/node_modules/uglify-js/lib/parse.js:196:18)

perhaps this would be fine:

element.after('<label class="input-error" role="alert" for="' + element.attr("id") + '">' + errorMessage + '</label>');

ember-cli: 0.2.7
ember-cli-uglify: 1.2.0

Error trying to run the example app.

Hello. I am evaluating the different EmberJS form libraries. I downloaded the latest release (0.0.16) and tried the follow steps but got an error.

>npm install & bower install
>ember serve
version: 0.1.4
Could not find watchman, falling back to NodeWatcher for file system events
Livereload server on port 35730
Serving on http://0.0.0.0:4200/
Path or pattern "bower_components/jquery/dist/jquery.js" did not match any files
Error: Path or pattern "bower_components/jquery/dist/jquery.js" did not match any fil

I then tried:

bower install --save-dev jquery
bower cached        git://github.com/jquery/jquery.git#2.1.3
bower validate      2.1.3 against git://github.com/jquery/jquery.git#*
bower cached        git://github.com/jquery/jquery.git#2.1.3
bower validate      2.1.3 against git://github.com/jquery/jquery.git#>= 1.7.0 < 2.2.0

Unable to find a suitable version for jquery, please choose one:
    1) jquery#~2.0 which resolved to 2.0.3 and is required by ember-cli-html5-validation 
    2) jquery#>= 1.7.0 < 2.2.0 which resolved to 2.1.3 and is required by ember#1.8.1 
    3) jquery#~2.1.3 which resolved to 2.1.3Prefix the choice with ! to persist it to bower.json
? Answer:: 1

Still did not work :(. Any ideas? It would be awesome if there was a demo hosted somewhere like Heroku so that people could test these forms without downloading.
Thank you.

Min validation doesn't seem to work

The HTML 5 Min validation is not working.

My form looks like,

{{#validatable-form action="createAccount" class="paper-form-box"}}
  {{input placeholder='Password'  type='password' value=password required=true min="6"}}
  {{input placeholder='Confirm Password'  type='password' value=passwordConfirmation required=true min=6}}
{{/validatable-form}}

The required validation is happening correctly. But the min validation doesn't seem to work at all.

PS: I tried both number and string as value for min.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.