intl_phone_field icon indicating copy to clipboard operation
intl_phone_field copied to clipboard

The validator does not trigger when submitting a form.

Open jakkr07 opened this issue 1 year ago • 6 comments

The validator does not trigger when submitting a form, but it does when there's a change in the input.

jakkr07 avatar Nov 06 '23 04:11 jakkr07

I'm having the same problem but as mentioned here, that's an intended behavior. I hope it helps.

jmvalenciz avatar Nov 08 '23 00:11 jmvalenciz

Running the same issue. It not validate in case of not interacting with field at all.

IvanKozhemyakinWG avatar Nov 09 '23 18:11 IvanKozhemyakinWG

same issue here

fnoceda avatar Nov 25 '23 23:11 fnoceda

same issue here

jhmarryme avatar Dec 11 '23 14:12 jhmarryme

same issue here

marwanayman11 avatar Dec 21 '23 16:12 marwanayman11

I used a FormField

FormField<String>(
      initialValue: seletedValue,
      validator: (widget.required == true) ? defaultValidator : widget.validator,
      builder: (formState) {
        return IntlPhoneField( 
          controller: widget.controller,
          decoration: InputDecoration(
            errorText: formState.errorText,
            labelText: widget.label,
            border: const OutlineInputBorder(
              borderSide: BorderSide(),
            ),
          ),
        );
      },
    );

aro-wolo avatar Mar 09 '24 12:03 aro-wolo