core-5087 fix validation logic in template form