-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c0ce631
commit ba2d9a1
Showing
2 changed files
with
9 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,17 @@ | ||
import { env } from '$env/dynamic/public'; | ||
|
||
export const nameRegExp = /^[a-zA-ZčČćĆdžDŽđĐšŠžŽ]+(?:(?:\s|-)[a-zA-ZčČćĆdžDŽđĐšŠžŽ]+)?$/; | ||
export const nameRegExpMsg = 'String must be 1-2 word(s) seperated by space or dash (-)'; | ||
export const nameRegExpMsg = 'String must be 1 or 2 word seperated by space or dash (-)'; | ||
|
||
export const indexRegExp = /^\d{1,4}[a-zA-Z]?\/(?:\d{2}|\d{4})(?:[A-Z]{1,3})?$/; | ||
export const indexRegExp = new RegExp( | ||
env.PUBLIC_INDEX_REGEX ?? /^\d{1,4}[a-zA-Z]?\/(?:\d{2}|\d{4})$/ | ||
); | ||
export const indexRegExpMsg = 'String must follow Student ID format'; | ||
|
||
export const uppercaseRegExp = /^[A-Z0-9_\-+/\\|]*$/; | ||
export const uppercaseRegExpMsg = | ||
'String can consist of uppercase letters, numbers, and symbols (_, -, +, /, \, |)'; | ||
'String can consist of uppercase letters, numbers, and symbols (_, -, +, /, \\, |)'; | ||
|
||
export const lowercaseRegExp = /^[a-z0-9_\-+/\\|]*$/; | ||
export const lowercaseRegExpMsg = | ||
'String can consist of lowercase letters, numbers, and symbols (_, -, +, /, \, |)'; | ||
'String can consist of lowercase letters, numbers, and symbols (_, -, +, /, \\, |)'; |