Skip to content
Snippets Groups Projects
Commit b84eed0f authored by Eirik Martin Danielsen's avatar Eirik Martin Danielsen :speech_balloon:
Browse files

Merge branch '59-limit-radius' into 'master'

Resolve "Limit radius"

Closes #59

See merge request !62
parents e0c66265 06c7070d
No related branches found
No related tags found
1 merge request!62Resolve "Limit radius"
export const NAME_MAX_LENGTH = 40;
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
......
......@@ -16,7 +16,7 @@ import { TextInput, HelperText } from "react-native-paper";
import { updateLocations } from "../../redux";
import { connect } from "react-redux";
import {
NUMBER_MAX_LENGTH,
LOCATION_NUMBER_MAX_LENGTH,
INTEGER_REGEX,
INVALID_INTEGER_MESSAGE,
NAME_MAX_LENGTH,
......@@ -124,7 +124,7 @@ const _RegisterLocationScreen = (props) => {
label="Radius"
keyboardType="number-pad"
onChangeText={(radius) => checkRadius(radius)}
maxLength={NUMBER_MAX_LENGTH}
maxLength={LOCATION_NUMBER_MAX_LENGTH}
/>
{radiusHint && (
<HelperText type="error" visible={radiusHint}>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment