Skip to content

Instantly share code, notes, and snippets.

@phillipharding
Created September 1, 2014 11:43
Show Gist options
  • Save phillipharding/e2422af511cce71eaaa6 to your computer and use it in GitHub Desktop.
Save phillipharding/e2422af511cce71eaaa6 to your computer and use it in GitHub Desktop.
Link To Document Validate - Original
function ValidateInput()
{ULSvlv:;
var form = document.forms.aspnetForm;
var folderUrl = form.ctl00_PlaceHolderMain_ctl01_ctl01_UrlInput.value;
var name = form.ctl00_PlaceHolderMain_ctl01_ctl01_NameInput.value;
if (name == null ||
folderUrl == null ||
typeof(name) == "undefined" ||
typeof(folderUrl) == "undefined" ||
name.length == 0 ||
!HasValidUrlPrefix(folderUrl))
{
alert(L_EnterValidUrl_Text);
return false;
}
if (name.length > 128 ||
name.length + folderUrl.length > 260)
{
alert(L_ItemOrFolderNameTooLong);
return false;
}
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment