Skip to content
This repository was archived by the owner on Feb 27, 2024. It is now read-only.

Commit 2eaf023

Browse files
author
Mike England
committed
Alphabetically relocate getRequiredSchema
1 parent 72fda2c commit 2eaf023

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

functions/gravityForms/yupSchema/StringSchemaFactory.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,6 @@ export default class StringSchemaFactory {
3636
.concat(this.getUrlSchema())
3737
}
3838

39-
/**
40-
* Get Yup required field validaion.
41-
*
42-
* @see https://github.com/jquense/yup#stringrequiredmessage-string--function-schema
43-
* @return {object} Yup validationSchema Object.
44-
*/
45-
getRequiredSchema() {
46-
if (!this.fieldData?.isRequired) {
47-
return
48-
}
49-
50-
return Yup.string().required('Required!')
51-
}
52-
5339
/**
5440
* Get Yup required field validaion.
5541
*
@@ -81,6 +67,20 @@ export default class StringSchemaFactory {
8167
)
8268
}
8369

70+
/**
71+
* Get Yup required field validaion.
72+
*
73+
* @see https://github.com/jquense/yup#stringrequiredmessage-string--function-schema
74+
* @return {object} Yup validationSchema Object.
75+
*/
76+
getRequiredSchema() {
77+
if (!this.fieldData?.isRequired) {
78+
return
79+
}
80+
81+
return Yup.string().required('Required!')
82+
}
83+
8484
/**
8585
* Get Yup required field validaion.
8686
*

0 commit comments

Comments
 (0)