# Validating UPROPERTY change

**URL:** <https://forums.unrealengine.com/t/validating-uproperty-change/301660>\
**Category:** C++\
**Tags:** UProperty, unreal-engine, editor, question, CPP\
**Created:** [December 15, 2014, 1:12pm UTC](https://forums.unrealengine.com/t/validating-uproperty-change/301660 "2014-12-15T13:12:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_e1690214](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e1690214](https://forums.unrealengine.com/u/anonymous_user_e1690214)\
**Post date:** [December 15, 2014, 1:12pm UTC](https://forums.unrealengine.com/t/validating-uproperty-change/301660/1 "2014-12-15T13:12:10Z")

</div>

I have a TSubclassOf\<\> property which shouldn’t be allowed to be None; if the user ever tries to set it to None in the editor, I’d like it to reject the change.

Is there a way to do this without creating a custom property editor? (I’d consider that approach, except that Slate is currently entirely undocumented.) PreEditChange/PostEditChangeProperty doesn’t seem to have any way to reject the change, or to recover the old value.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e1690214](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e1690214](https://forums.unrealengine.com/u/anonymous_user_e1690214)\
**Post date:** [December 15, 2014, 1:22pm UTC](https://forums.unrealengine.com/t/validating-uproperty-change/301660/2 "2014-12-15T13:22:50Z")

</div>

Adding NoClear to the property definition stopped None from showing up. (Should that be documented? I had to paw through source code to figure out that it would do that.) Still, it would be good to know how to validate properties in general.
