diff options
Diffstat (limited to 'lib/network/connection/cellular_card.pm')
-rw-r--r-- | lib/network/connection/cellular_card.pm | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/network/connection/cellular_card.pm b/lib/network/connection/cellular_card.pm index eb0851e..fb6948f 100644 --- a/lib/network/connection/cellular_card.pm +++ b/lib/network/connection/cellular_card.pm @@ -68,6 +68,15 @@ sub get_hardware_settings { [ { label => N("PIN number"), val => \$self->{hardware}{pin}, hidden => 1 } ]; } +sub check_hardware_settings { + my ($self) = @_; + if ($self->{hardware}{pin} !~ /^[0-9]{4}$/) { + $self->{hardware}{error} = N("Wrong PIN number format: it should be 4 digits."); + return 0; + } + 1; +} + sub get_peer_default_options { my ($self) = @_; $self->SUPER::get_peer_default_options, |