Coder Social home page Coder Social logo

Comments (7)

steambap avatar steambap commented on June 10, 2024 1

I'm unable to reproduce your problem with the most recent version. Which version are you using?

If you update to the latest version, you can write:

// instead of writing all the letters, just declare that you want numbers only
svgCaptcha.options.charPreset = '0123456789';
// create captcha
const captcha = svgCaptcha.create();
// assign captcha text to session and send captcha data to client

That said, I am happy to work this out if you do not want to update the package.

from svg-captcha.

steambap avatar steambap commented on June 10, 2024

I just rechecked your word, are you saying that svgCaptcha.randomText methods returns a number like 729 or 91 instead of a string like '0729' or '0091'

from svg-captcha.

hugojing avatar hugojing commented on June 10, 2024

Yes.

from svg-captcha.

hugojing avatar hugojing commented on June 10, 2024

突然意识到你可能是**人。。。

啊我的蹩脚的英语。。(/ω╲)

from svg-captcha.

steambap avatar steambap commented on June 10, 2024

npm ls svg-captcha

你在你的项目目录下运行这个命令,看看是哪个版本

from svg-captcha.

hugojing avatar hugojing commented on June 10, 2024

1.0.7

我升级到最新版试一下。

from svg-captcha.

hugojing avatar hugojing commented on June 10, 2024

试了一下,应该旧版和最新版生成的是对的 string, 是我弄错了,抱歉。

from svg-captcha.

Related Issues (20)

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.