Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.
Function mtuValidator(bool required) {
return (String str) {
if (str == "") {
return required ? 'Please fill out this field' : null;
}
var mtu = int.tryParse(str);
if (mtu == null || mtu < 0 || mtu > 65535) {
return 'Please enter a valid mtu';
return null;
};