Skip to content

Commit

Permalink
feat: update validate username
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel-logan committed May 1, 2024
1 parent 83d8e06 commit eac0bb5
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions packages/typescript/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,18 @@ If you want to help me, you can buy me a coffee (:

jsDelivr:
```bash
https://cdn.jsdelivr.net/npm/multiform-validator@1.1.3/dist/bundle.min.js
https://cdn.jsdelivr.net/npm/multiform-validator@1.1.4/dist/bundle.min.js
```
```html
<scritp src="https://cdn.jsdelivr.net/npm/multiform-validator@1.1.3/dist/bundle.min.js"></script>
<scritp src="https://cdn.jsdelivr.net/npm/multiform-validator@1.1.4/dist/bundle.min.js"></script>
```

unpkg:
```bash
https://unpkg.com/multiform-validator@1.1.3/dist/bundle.js
https://unpkg.com/multiform-validator@1.1.4/dist/bundle.js
```
```html
<scritp src="https://unpkg.com/multiform-validator@1.1.3/dist/bundle.js"></script>
<scritp src="https://unpkg.com/multiform-validator@1.1.4/dist/bundle.js"></script>
```


Expand Down
2 changes: 1 addition & 1 deletion packages/typescript/dist/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/typescript/dist/src/validateUsername.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var defaultErrorMsg = [
'username too short',
'This username is too long',
'Username cannot contain spaces',
'Cannot start with number',
'Cannot start with a number',
'Cannot contain only numbers',
'Unknown error',
];
Expand Down
2 changes: 1 addition & 1 deletion packages/typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "multiform-validator",
"version": "1.1.3",
"version": "1.1.4",
"description": "Javascript library made to validate, several form fields, such as: email, phone, password, cpf etc.",
"main": "./dist/index.js",
"types": "./types/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions packages/typescript/src/validateUsername.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const defaultErrorMsg: string[] = [
'username too short',
'This username is too long',
'Username cannot contain spaces',
'Cannot start with number',
'Cannot start with a number',
'Cannot contain only numbers',
'Unknown error',
];
Expand All @@ -32,7 +32,7 @@ const defaultErrorMsg: string[] = [
'Username must be between ${maxLenthUsername} and ${maxLenthUsername} characters',
'Username must be between ${maxLenthUsername} and ${maxLenthUsername} characters',
'Username cannot contain spaces',
'Cannot start with number',
'Cannot start with a number',
'Cannot contain only numbers',
'Unknown error'
];
Expand Down
2 changes: 1 addition & 1 deletion packages/typescript/types/src/validateUsername.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { ValidateFunctions } from './types';
'Username must be between ${maxLenthUsername} and ${maxLenthUsername} characters',
'Username must be between ${maxLenthUsername} and ${maxLenthUsername} characters',
'Username cannot contain spaces',
'Cannot start with number',
'Cannot start with a number',
'Cannot contain only numbers',
'Unknown error'
];
Expand Down

0 comments on commit eac0bb5

Please sign in to comment.