Ejemplo n.º 1
0
        private bool FieldsValid()
        {
            bool fieldsValid = true;

            fieldsValid = controlParser.ValidateFields();
            if (!DataConsistency.ValidPhoneNumber(PhoneNumberTextBox.Text))
            {
                fieldsValid = false;
                controlParser.SetError(PhoneNumberTextBox, false);
            }
            else
            {
                controlParser.SetError(PhoneNumberTextBox, true);
            }
            return(fieldsValid); //if fields are missing return false to trigger a message if needed
        }
Ejemplo n.º 2
0
        private bool CheckFields()
        {
            bool validFields = true;

            validFields = controlParser.ValidateFields();

            LockUnlockUserField();

            if (PhoneNumTextBox.Text.Trim() != "" && !DataConsistency.ValidPhoneNumber(PhoneNumTextBox.Text))
            {
                validFields = false;
                controlParser.SetError(PhoneNumTextBox, false);
                OtherFunctions.Message("Invalid phone number.", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, "Error", this);
            }

            return(validFields);
        }