Skip to content

Commit

Permalink
Use trim() instead of trimEnd()
Browse files Browse the repository at this point in the history
  • Loading branch information
leighmacdonald committed Jan 2, 2024
1 parent a2ff026 commit 93e4fe5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/util/validators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const steamIDOrEmptyString = async (
input: string,
individualOnly: boolean = true
) => {
const steamIdInput = input.trimEnd();
const steamIdInput = input.trim();

if (emptyOrNullString(steamIdInput)) {
return '';
Expand Down Expand Up @@ -109,4 +109,4 @@ export const steamIDOrEmptyString = async (
const ipRegex =
/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/gi;

export const isValidIP = (value: string): boolean => ipRegex.test(value);
export const isValidIP = (value: string): boolean => ipRegex.test(value);

0 comments on commit 93e4fe5

Please sign in to comment.