@@ -173,8 +173,8 @@ export interface FormProps<T = any, S extends StrictRJSFSchema = RJSFSchema, F e
173173 * still submit the form when these are the only errors displayed to the user.
174174 */
175175 extraErrors ?: ErrorSchema < T > ;
176- /** If set to true, causes the `extraErrors` to become blocking when the form is submitted */
177- extraErrorsBlockSubmit ?: boolean ;
176+ /** If set to true, treats `extraErrors` as warnings instead of blocking form submission */
177+ extraErrorsAreWarnings ?: boolean ;
178178 /** If set to true, turns off HTML5 validation on the form; Set to `false` by default */
179179 noHtml5Validate ?: boolean ;
180180 /** If set to true, turns off all validation. Set to `false` by default
@@ -1216,14 +1216,14 @@ export default class Form<
12161216 * @returns - True if the form is valid, false otherwise.
12171217 */
12181218 validateFormWithFormData = ( formData ?: T ) : boolean => {
1219- const { extraErrors, extraErrorsBlockSubmit , focusOnFirstError, onError } = this . props ;
1219+ const { extraErrors, focusOnFirstError, onError, extraErrorsAreWarnings } = this . props ;
12201220 const { errors : prevErrors } = this . state ;
12211221 const schemaValidation = this . validate ( formData ) ;
12221222 let errors = schemaValidation . errors ;
12231223 let errorSchema = schemaValidation . errorSchema ;
12241224 const schemaValidationErrors = errors ;
12251225 const schemaValidationErrorSchema = errorSchema ;
1226- const hasError = errors . length > 0 || ( extraErrors && extraErrorsBlockSubmit ) ;
1226+ const hasError = errors . length > 0 || ( extraErrors && extraErrorsAreWarnings !== true ) ;
12271227 if ( hasError ) {
12281228 if ( extraErrors ) {
12291229 const merged = validationDataMerge ( schemaValidation , extraErrors ) ;
0 commit comments