Q:

Restrict User input using Data Annotations

I have a property on a view model that is a numeric type;
[Display(Name="Year Began")]
public short? YearBegan { get; set; }

However with this the user can still input non-numeric values (i.e. "asdf"). This does do a validation and tells the user on blur that the values entered must be numeric - but I want to prevent the user from inputing invalid values in the first place (something like a input mask).
Is there a way to restrict input to prevent the user from inputing non valid (in this case anything not numeric) using only DataAnnotations attributes? 

A:

but I want to prevent the user from inputing invalid values in the
  first place (something like a input mask).

This is not possible to be achieved on the server only. You will have to resort to javascript.
So there are couple of plugins which you could use. For example the jQuery numeric plugin. And if you don't want to rely on external plugins you could always roll your own implementation as shown in this article:
$(document).ready(function() {
    $("#txtboxToFilter").keydown(function(event) {
        // Allow only backspace and delete
        if ( event.keyCode == 46 || event.keyCode == 8 ) {
            // let it happen, don't do anything
        } else {
            // Ensure that it is a number and stop the keypress
            if (event.keyCode < 48 || event.keyCode > 57 ) {
                event.preventDefault(); 
            }
        }
    });
});

You could of course make it more general and apply a class="numeric" to all input fields that allow only integers and then adapt your selector: $(".numeric").keydown(function(event) { ... });

