Coder Social home page Coder Social logo

Comments (4)

rahulrao0209 avatar rahulrao0209 commented on August 16, 2024 1

Closing this issue as the Constraints type has been exposed.

from checkpass.

rahulrao0209 avatar rahulrao0209 commented on August 16, 2024

Hello @tleperou
Firstly, thanks for taking the time to try out the library!

As to your question, I believe you're saying we need to export the Constraints type as well.
On those lines, I've made the updates so you could do something like this
checkpass-api-usage

This should make it easier to consume the library code. You will find these updates in version 2.0.1 or version 1.0.6 (they're both actually the same and don't have any breaking changes.)

There is also version 3.0.0 which has a major API update. The code now checks against all the constraints simultaneously and returns an object with details about all the constraints. Something like this
checkpass-v3-API-usage
So as you can see above, the constraints minCapitalLetters and minSpecialCharacters are failing and so they have value set to true and a corresponding generic failure message.

This is done to make the usage of the library more flexible as the user can decide what to do with the returned constrained checks as opposed to just getting a string based on one of the failed checks.
Please use versions 1.0.6 or 2.0.1 to use the code as you have been. Version 3 has an API update which would work differently as above.

from checkpass.

tleperou avatar tleperou commented on August 16, 2024

Awesome! Well, thanks for taking time to explain all of that.

Is the version 3 stable and ready to used?

🖖

from checkpass.

rahulrao0209 avatar rahulrao0209 commented on August 16, 2024

Yes, it should be. Let me know if anything does not work right or if you face any issues.

from checkpass.

Related Issues (1)

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.