File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -1182,6 +1182,36 @@ class FormBuilderValidators {
11821182 checkNullOrEmpty: checkNullOrEmpty,
11831183 ).validate;
11841184
1185+ /// [FormFieldValidator] that requires the field's value to be a valid float.
1186+ ///
1187+ /// ## Parameters:
1188+ /// - [errorText] The error message when the float is invalid.
1189+ /// - [checkNullOrEmpty] Whether to check for null or empty values.
1190+ /// {@macro float_template}
1191+ static FormFieldValidator <T > float <T >({
1192+ String ? errorText,
1193+ bool checkNullOrEmpty = true ,
1194+ }) =>
1195+ FloatValidator <T >(
1196+ errorText: errorText,
1197+ checkNullOrEmpty: checkNullOrEmpty,
1198+ ).validate;
1199+
1200+ /// [FormFieldValidator] that requires the field's value to be a valid hexadecimal.
1201+ ///
1202+ /// ## Parameters:
1203+ /// - [errorText] The error message when the hexadecimal is invalid.
1204+ /// - [checkNullOrEmpty] Whether to check for null or empty values.
1205+ /// {@macro hexadecimal_template}
1206+ static FormFieldValidator <String > hexadecimal ({
1207+ String ? errorText,
1208+ bool checkNullOrEmpty = true ,
1209+ }) =>
1210+ HexadecimalValidator (
1211+ errorText: errorText,
1212+ checkNullOrEmpty: checkNullOrEmpty,
1213+ ).validate;
1214+
11851215 /// [FormFieldValidator] that requires the value to be a valid integer.
11861216 ///
11871217 /// ## Parameters:
You can’t perform that action at this time.
0 commit comments