Is there a way to set a max length on a window.prompt? I want to limit the number of characters to 50 that a user can enter. This is the code I am using to get the prompt:

var newName = window.prompt('What do you want to name this Content Version?', contentName);
//if they click cancel or enter an empty string, exit the function
if ((newName == null) || (newName == '')){
return;
}