Skip to content

Commit

Permalink
Correct disableTransform value
Browse files Browse the repository at this point in the history
  • Loading branch information
sadie-phantom committed Feb 19, 2024
1 parent 8515d2a commit af834ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/yupValidator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import {
let disableAppFormatTransformValue = false;

//transform passed values to first character uppercase and replace spaces with underscores
const unifyValuesTransform = (value: string, ifTransform = true) => {
if (!ifTransform) return value;
const unifyValuesTransform = (value: string, disableTransform = false) => {
if (disableTransform) return value;
return (
value.trim().charAt(0).toUpperCase() +
value.trim().slice(1).toLowerCase().replace(/ /g, "_").replace(/-/g, "_")
Expand Down

0 comments on commit af834ba

Please sign in to comment.