@codacy/ui-components 0.66.39 → 0.66.40

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.
@@ -201,7 +201,9 @@ function generateRegexInputValidator(regex, errorMessage, inputType) {
201
201
  errorMessage: errorMessage
202
202
  }], inputType);
203
203
  }
204
- export const useEmailInput = generateRegexInputValidator(/^([a-zA-Z0-9_\-.]+)@([a-zA-Z0-9_\-.]+)\.([a-zA-Z]{2,5})$/, 'Insert a valid email address', 'email');
204
+ export const useEmailInput = generateRegexInputValidator(
205
+ // Domains are limited to 2-64 characters according to https://emailregex.com
206
+ /^([a-zA-Z0-9_\-.]+)@([a-zA-Z0-9_\-.]+)\.([a-zA-Z]{2,64})$/, 'Insert a valid email address', 'email');
205
207
  export const useUrlInput = generateRegexInputValidator(/((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=+$,\w]+@)?[A-Za-z0-9.-]+|(?:www\.|[-;:&=+$,\w]+@)[A-Za-z0-9.-]+)((?:\/[+~%/.\w\-_]*)?\??(?:[-+=&;%@.\w_]*)#?(?:[.!/\\\w]*))?)/, 'Insert a valid URL', 'url');
206
208
  export const useRegexInput = (regex, errorMessage, inputType) => {
207
209
  return generateRegexInputValidator(regex, errorMessage, inputType);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codacy/ui-components",
3
- "version": "0.66.39",
3
+ "version": "0.66.40",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "",