Skip to content

Commit d499def

Browse files
committed
chore: use reuiredField util
1 parent dbd7ae6 commit d499def

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/Shared/validations.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -474,11 +474,8 @@ export const validateCMVolumeMountPath = (value: string): { isValid: boolean; me
474474

475475
export const validateYAML = (yamlString: string, isRequired?: boolean): ValidationResponseType => {
476476
try {
477-
if (!yamlString && isRequired) {
478-
return {
479-
isValid: false,
480-
message: 'Empty yaml string',
481-
}
477+
if (isRequired) {
478+
requiredField(yamlString)
482479
}
483480
parse(yamlString)
484481
return {

0 commit comments

Comments
 (0)