Skip to content
Snippets Groups Projects
Commit f94badc0 authored by Anders Langlie's avatar Anders Langlie
Browse files

location names can contain spaces

parent eb0aaacc
No related branches found
No related tags found
1 merge request!71Resolve "Fix location regex"
......@@ -2,7 +2,7 @@ import axios from "axios";
// Create axios client, pre-configured with baseURL
let APIKit = axios.create({
baseURL: "http://192.168.0.30:5000",
baseURL: "http://192.168.10.176:5000",
timeout: 60000,
headers: { "Content-Type": "multipart/form-data" },
});
......
......@@ -3,8 +3,10 @@ export const NUMBER_MAX_LENGTH = 15;
export const LOCATION_NUMBER_MAX_LENGTH = 4;
/******************************************* REGEXES ************************************************/
export const EMAIL_REGEX = "^[ÆØÅæøåa-zA-Z0-9_.+-]+@[ÆØÅæøåa-zA-Z0-9-]+\\.[ÆØÅæøåa-zA-Z0-9-.]+$"; // Valid email
export const PASSWORD_REGEX = "^(?=.*[ÆØÅæøåA-Za-z])(?=.*\\d)[ÆØÅæøåA-Za-z\\d]{2,}$"; // 9 characters, at least one letter and one number
export const EMAIL_REGEX =
"^[ÆØÅæøåa-zA-Z0-9_.+-]+@[ÆØÅæøåa-zA-Z0-9-]+\\.[ÆØÅæøåa-zA-Z0-9-.]+$"; // Valid email
export const PASSWORD_REGEX =
"^(?=.*[ÆØÅæøåA-Za-z])(?=.*\\d)[ÆØÅæøåA-Za-z\\d]{2,}$"; // 9 characters, at least one letter and one number
export const MEASUREMENT_REGEX = "^(\\d+(?:[\\.\\,]\\d{1,2})?)$"; // Accepts integers and decimal numbers with comma or period. 2 decimal precision!
export const INTEGER_REGEX = "^[0-9]*[1-9][0-9]*$"; //Accepts only integers
export const LEGAL_LOCATION_REGEX = "^[ÆØÅæøå \\w\\-]+$"; //Accepts trings containing legal file characters
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment