@@ -799,6 +799,22 @@ <h1>Telegram Limits Editor</h1>
799
799
const structureSection = this . structure . find ( section => section . id === sectionId ) ;
800
800
const localizationSection = this . localization [ sectionId ] ;
801
801
802
+ if ( ! localizationSection . name ) {
803
+ throw new ValidationError ( `Section name is empty for section ${ sectionId } ` , true ) ;
804
+ }
805
+
806
+ if ( ! structureSection . color ) {
807
+ throw new ValidationError ( `Section color is empty for section ${ sectionId } ` , true ) ;
808
+ }
809
+
810
+ if ( ! structureSection . icon ) {
811
+ throw new ValidationError ( `Section icon is empty for section ${ sectionId } ` , true ) ;
812
+ }
813
+
814
+ if ( ! this . iconCodePoints [ structureSection . icon ] ) {
815
+ throw new ValidationError ( `Icon ${ structureSection . icon } is not found in the icon code points map for section ${ sectionId } ` , true ) ;
816
+ }
817
+
802
818
const rgbRegex = / ^ ( \d { 1 , 3 } ) , ( \d { 1 , 3 } ) , ( \d { 1 , 3 } ) $ / ;
803
819
804
820
const match = structureSection . color . match ( rgbRegex ) ;
@@ -846,11 +862,11 @@ <h1>Telegram Limits Editor</h1>
846
862
const iconName = item . icon ;
847
863
848
864
if ( iconName . length === 0 ) {
849
- throw new ValidationError ( `Icon name is empty for item ${ item . id } in section ${ sectionId } ` ) ;
865
+ throw new ValidationError ( `Icon name is empty for item ${ item . id } in section ${ sectionId } ` , true ) ;
850
866
}
851
867
852
868
if ( ! this . iconCodePoints [ iconName ] ) {
853
- throw new ValidationError ( `Icon ${ iconName } is not found in the icon code points map for item ${ item . id } in section ${ sectionId } ` ) ;
869
+ throw new ValidationError ( `Icon ${ iconName } is not found in the icon code points map for item ${ item . id } in section ${ sectionId } ` , true ) ;
854
870
}
855
871
}
856
872
}
0 commit comments