Comments (5)
No description provided.
你检查一下缩略图的校验文本随机范围长度的 SetRangCheckTextLen 和 主图显示的文本随机范围长度的 SetTextRangLen
from go-captcha.
chars := []string{"HE", "CA", "WO", "NE", "HT"}
Capt.SetTextRangLen(captcha.RangeVal{Min: 5, Max: 5})
Capt.SetRangCheckTextLen(captcha.RangeVal{Min: 1, Max: 1})
我现在是这样的
但是还是有概率刷不出来
from go-captcha.
默认情况下是不需要设置 SetRangChars 的,因为内置有足够多的中文的文本种子。
如果实在需要自定义设置字母的种子,你将种子设置得多一些,最好是超过上百个。
目前你也可以自己写个函数专门生成A-Z由两个字符组成唯一的n多个组合,例如:{"HE", "CA", "WO", "NE", "HT", "IE", "PG", "GI", "CH", "CO", "DA" .... }。
还有就是 SetRangCheckTextLen 别设置那么短,理想是 3-5。
关于生成字母或数字组合的种子函数,在后面的版本中也会考虑加入。
from go-captcha.
默认情况下是不需要设置 SetRangChars 的,因为内置有足够多的中文的文本种子。 如果实在需要自定义设置字母的种子,你将种子设置得多一些,最好是超过上百个。 目前你也可以自己写个函数专门生成A-Z由两个字符组成唯一的n多个组合,例如:{"HE", "CA", "WO", "NE", "HT", "IE", "PG", "GI", "CH", "CO", "DA" .... }。 还有就是 SetRangCheckTextLen 别设置那么短,理想是 3-5。
关于生成字母或数字组合的种子函数,在后面的版本中也会考虑加入。
好 我尝试这样做一下 需要ts版本的react 组件吗 可以给你提个pr
from go-captcha.
感谢对go-captcha库的支持,在v2.0将有ts版的组件
from go-captcha.
Related Issues (9)
- 大佬,求教一下校验的方法,文档中貌似少了怎么校验? HOT 1
- go-captcha-example 启动后验证失败 HOT 1
- 设置字符集为英文字母时,验证容易报错 HOT 1
- capt.SetRangCheckTextLen 判断条件与变量名存在误导 HOT 2
- 是否考虑加入更多验证方式 HOT 3
- 我做了一个Angular版本的示例代码 HOT 1
- 文档再完善些,示例再精简些 HOT 1
- 给诸位提个醒,关系文字的坐标的 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-captcha.