altcha 0.6.1 → 0.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -2
- package/dist/altcha.js +275 -270
- package/dist/altcha.umd.cjs +2 -1
- package/dist_external/altcha.js +257 -252
- package/dist_external/altcha.umd.cjs +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -194,22 +194,30 @@ The Spam Filter can be enabled with default configuration by setting the `spamfi
|
|
|
194
194
|
|
|
195
195
|
```ts
|
|
196
196
|
interface SpamFilter {
|
|
197
|
+
blockedCountries?: string[];
|
|
198
|
+
classifier?: string;
|
|
199
|
+
disableRules?: string[];
|
|
197
200
|
email?: string | false;
|
|
198
|
-
expectedLanguages?: string[];
|
|
199
201
|
expectedCountries?: string[];
|
|
202
|
+
expectedLanguages?: string[];
|
|
200
203
|
fields?: string[] | false;
|
|
201
204
|
ipAddress?: string | false;
|
|
205
|
+
text?: string | string[];
|
|
202
206
|
timeZone?: string | false;
|
|
203
207
|
}
|
|
204
208
|
```
|
|
205
209
|
|
|
206
210
|
SpamFilter configuration options:
|
|
207
211
|
|
|
212
|
+
- __blockedCountries__ - An array of country codes (ISO 3166 alpha-2) that you want to block.
|
|
213
|
+
- __classifier__ - Enforce a specific classifier.
|
|
214
|
+
- __disableRules__ - An array of rules to disable.
|
|
208
215
|
- __email__ - The name of the input field for the user's email. Disable email checking with `false`.
|
|
209
|
-
- __expectedLanguages__ - An array of expected languages as 2-letter codes (ISO 639 alpha-2).
|
|
210
216
|
- __expectedCountries__ - An array of expected countries as 2-letter codes (ISO 3166-1 alpha-2).
|
|
217
|
+
- __expectedLanguages__ - An array of expected languages as 2-letter codes (ISO 639 alpha-2).
|
|
211
218
|
- __fields__ - An array of input names to send to the spam filter.
|
|
212
219
|
- __ipAddress__ - The user's IP is detected automatically but can be overridden or disabled with `false`.
|
|
220
|
+
- __text__ - The text to classify. An array of strings can also be submitted.
|
|
213
221
|
- __timeZone__ - The user's timezone is detected automatically but can be overridden or disabled with `false`.
|
|
214
222
|
|
|
215
223
|
To include the email field into `fields` (for easier server-side verification), configure the list of input names using the `spamfilter.fields: string[]` option.
|