I have an HTML `<form>` that I'm trying to validate using jQuery. So far I have it so that if a required field is left blank, some text is appended to the field's associated label informing the user. This is done like so:

```
    $(requiredInputs).on('blur', function(){
        //isolate name attribute of field left
        var fieldname = $(this).attr('name');
        //use name value to find associated label to field
        var label = $("#registration label[for='"+fieldname+"']");
        //sanitize and store current input value in variable
        var inputValue = $.trim($(this).val());
        if (inputValue.length === 0){
            //new div to be appended to the label
            var alert = '<p><small>This is a required field!</small></p>';
            //change HTML to inform user
            $(label).html(label.html() + alert);
            //emphasise input box
            $(this).css('border', '2px solid red');
        }
    });

```

I also have an event that removes the red border as soon as some text is input: 

```
    //turn field back to normal on text entry
    $(requiredInputs).on('input', function(){
        //de-emphasise input box
        $(this).css('border', 'none');
    });

```

What I want to add into this event is to get rid of the 'required field' message at the same time, returning the label to just its original text. I don't know how best to go about this, as the `label.html()` value has been changed from its original state when the warning is added. Can this be done using a toggle function of some sort?

Thanks in advance,
Mark