Giter Site home page Giter Site logo

compareto's Introduction

Hi there ๐Ÿ‘‹

  • My name's Alex and I work at @Scrimba where I host The Scrimba Podcast, make YouTube videos, and support writers on the company blog
  • Before all that, I was a (mostly JavaScript) Full-Stack Web Developer and Developer Advocate
  • You can still find some of my projects and contributions here on GitHub but I don't code as much as I would like ๐Ÿ‘พ!

Projects

compareto's People

Contributors

garyscorner avatar zhouzi avatar

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  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

compareto's Issues

JavaScript errors

At the moment, if the no element with the name attribute specified by the compareTo attribute can be found, compareTo fails silently. It would be nice if an error was displayed in the console. Similarly, when more than one matching element is found, nothing happens.

Drop jQuery dependency

jQuery is not really needed in this case, I don't think. Having to reference it can be an inconvenience and so, I want to drop jQuery in favour of "vanilla JavaScript".

Update readme

Update the readme to reflect

  • the new compareToError attribute
  • the new errors
  • the fact that, users can have multiple compareTo elements on the same page.

All of these changes, by the way, are courtesy of @GarysCorner!

Custom error message

If someone wants to change the error message, they should be able to do so using an attribute, comparisonErrorText:

<input type="password" name="password" required>
<input type="password" compareTo="password" comparisonErrorText="custom error here">

This will also be useful in the case that the user wants to compare something other than passwords.

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.