How to give a warning in the inspector window if a value (speed) is greater than 10? (C#)

How to make this?
If I change something in the inspector window how to check it if it’s greater than 10 and if it is, then give a warning until the user change it?

you can prevent the user from giving larger value than 10:

    private int myInt = 0;

if you want the warning you would have to go through Editor script to get and check the value. I would use the above.