UEditorValidatorBase

The EditorValidatorBase is a class which verifies that an asset meets a specific ruleset.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

DataValidation

Header

/Engine/Plugins/Editor/DataValidation/Source/DataValidation/Public/EditorValidatorBase.h

Include

#include "EditorValidatorBase.h"

Syntax

UCLASS(Abstract, Blueprintable, Meta=(ShowWorldContextPin))
class UEditorValidatorBase : public UObject

Remarks

The EditorValidatorBase is a class which verifies that an asset meets a specific ruleset. It should be used when checking engine-level classes, as UObject::IsDataValid requires overriding the base class. You can create project-specific version of the validator base, with custom logging and enabled logic.

C++ and Blueprint validators will be gathered on editor start, while python validators need to register themselves

Variables

Name Description

Protected variable UProperty Category, EditAnywhere, Meta

bool

 

bIsEnabled

Constructors

Name Description

Public function

UEditorValidatorBase()

Functions

Name Description

Public function UFunction BlueprintCallable, Category

void

 

AssetFails

(
    UObject* InAsset,
    const FText& InMessage,
    TArray< FText >& ValidationErrors
)

Public function UFunction BlueprintCallable, Category

void

 

AssetPasses

(
    UObject* InAsset
)

Public function UFunction BlueprintCallable, Category

void

 

AssetWarning

(
    UObject* InAsset,
    const FText& InMessage
)

Public function Const UFunction Category blueprintnativeevent

bool

 

CanValidate

(
    const EDataValidationUsecase InUsec...
)

Override this to determine whether or not you can use this validator given this usecase

Public function Const UFunction Category blueprintnativeevent

bool

 

CanValidateAsset

(
    UObject* InAsset
)

Override this to determine whether or not you can validate a given asset with this validator

Public function Const

const TArray...

 

GetAllWarnings()

Public function Const UFunction BlueprintCallable, Category

EDataValidat...

 

GetValidationResult()

Public function Virtual Const

bool

 

IsEnabled()

Public function Const

bool

 

IsValidationStateSet()

Protected function

void

 

LogElapsedTime

(
    FFormatNamedArguments& Arguments
)

Public function

void

 

ResetValidationState()

Public function UFunction Category blueprintnativeevent

EDataValidat...

 

ValidateLoadedAsset

(
    UObject* InAsset,
    TArray< FText >& ValidationErrors
)