Question: Trying to figure out if there's a more succinct or elegant way to write the code below. I'm replacing any slashes in a text box with dashes, then applying a validation rule to the textbox using a custom format string:

```
var bday = $("#home-birthday");
var bdayVal = bday.val();
bday
    .val(bdayVal
        .replace(/\//g, '-')
    )
;
bday
    .rules("add", {
        mydate: true
    })
;

```

I've had a few variations, but figured I'd just throw it up here and see if there's a better way.

Answer: 
```
$("#home-birthday").val(function(i, val) {
    return val.replace(/\//g, '-');
}).rules('add', {mydate: true});

```
```
var bday = $("#home-birthday");
bday.val(
    bday.val().replace(/\//g, '-')
).rules(
    "add", 
    {mydate: true}
);

```