{"record":{"id":"993278682bd8719c","repo":"pentaho/pentaho-kettle","slug":"mailvalidator-error-emailvalidmsgmissing","errorCode":null,"errorMessage":"MailValidator.Error.EMailValidMsgMissing","messagePattern":"MailValidator\\.Error\\.EMailValidMsgMissing","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/mail-validator/impl/src/main/java/org/pentaho/di/trans/steps/mailvalidator/MailValidator.java","lineNumber":78,"sourceCode":"    if ( first ) {\n      first = false;\n\n      // get the RowMeta\n      data.previousRowMeta = getInputRowMeta().clone();\n      data.NrPrevFields = data.previousRowMeta.size();\n      data.outputRowMeta = getInputRowMeta().clone();\n      meta.getFields( getTransMeta().getBowl(), data.outputRowMeta, getStepname(), null, null, this, repository,\n        metaStore );\n\n      // check result fieldname\n      data.realResultFieldName = environmentSubstitute( meta.getResultFieldName() );\n      if ( Utils.isEmpty( data.realResultFieldName ) ) {\n        throw new KettleException( BaseMessages.getString( PKG, \"MailValidator.Error.ResultFieldNameMissing\" ) );\n      }\n\n      if ( meta.isResultAsString() ) {\n        if ( Utils.isEmpty( meta.getEMailValideMsg() ) ) {\n          throw new KettleException( BaseMessages.getString( PKG, \"MailValidator.Error.EMailValidMsgMissing\" ) );\n        }\n\n        if ( Utils.isEmpty( meta.getEMailNotValideMsg() ) ) {\n          throw new KettleException( BaseMessages.getString( PKG, \"MailValidator.Error.EMailNotValidMsgMissing\" ) );\n        }\n\n        data.msgValidMail = environmentSubstitute( meta.getEMailValideMsg() );\n        data.msgNotValidMail = environmentSubstitute( meta.getEMailNotValideMsg() );\n      }\n\n      // Check is email address field is provided\n      if ( Utils.isEmpty( meta.getEmailField() ) ) {\n        throw new KettleException( BaseMessages.getString( PKG, \"MailValidator.Error.FilenameFieldMissing\" ) );\n      }\n\n      data.realResultErrorsFieldName = environmentSubstitute( meta.getErrorsField() );\n\n      // cache the position of the field","sourceCodeStart":60,"sourceCodeEnd":96,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/mail-validator/impl/src/main/java/org/pentaho/di/trans/steps/mailvalidator/MailValidator.java#L60-L96","documentation":"MailValidator.processRow() throws this KettleException when the step is configured to return its result as a string but the 'valid email message' (EMailValideMsg) is empty. This message is the value written to the result field when the address validates, so it is mandatory in string-result mode.","triggerScenarios":"Running the Mail Validator step with 'result as string' enabled while the 'valid email message' field in the step dialog is blank.","commonSituations":"Switching the step from boolean output to string output without filling in the new message fields; copying a step configuration between transformations; missing default value after an upgrade of the plugin.","solutions":["Open the Mail Validator step dialog and enter a value for the 'valid email message' (e.g. 'OK').","Disable 'result as string' if you only need a boolean result field.","Set it in code: meta.setEMailValideMsg(\"OK\").","Also verify the corresponding 'not valid' message is set (its check follows immediately)."],"exampleFix":"// before\nmeta.setResultAsString( true );\nmeta.setEMailValideMsg( \"\" );\n// after\nmeta.setResultAsString( true );\nmeta.setEMailValideMsg( \"OK\" );\nmeta.setEMailNotValideMsg( \"BAD\" );","handlingStrategy":"validation","validationCode":"if ( meta.isResultAsString()\n    && ( meta.getEMailValideMsg() == null || meta.getEMailValideMsg().isEmpty() ) ) {\n  meta.setEMailValideMsg( \"OK\" );\n}","typeGuard":null,"tryCatchPattern":"try {\n  trans.execute( null );\n} catch ( KettleException e ) {\n  if ( e.getMessage().contains( \"EMailValidMsgMissing\" ) ) {\n    logError( \"Set 'valid email message' or disable result-as-string\" );\n  }\n  throw e;\n}","preventionTips":["Whenever enabling result-as-string, fill both valid and not-valid messages.","Default messages in step metadata templates.","Review step settings after plugin upgrades.","Unit-test transformations that use string-result mail validation."],"tags":["configuration","transformation","email-validation"],"backgroundTag":"empty-required-field","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}