Do you have or had had Nightmode installed?
I believe it breaks this because it overrides the ValidateCustomLess file with a version that isn't compatible with Flarum 1.2.
You might need to delete the vendor folder and run composer install to recover the original file version if disabling Nightmode and updating isn't enough.
EDIT: opened issue FriendsOfFlarum/nightmode56