Created
October 3, 2013 04:20
-
-
Save PetersonDave/6804928 to your computer and use it in GitHub Desktop.
Sitecore Password-Confirmation validator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Sitecore.Form.Core.Validators; | |
using System.Web.UI; | |
using System.Web.UI.WebControls; | |
namespace Sitecore.Form.Core.Client.Validators | |
{ | |
public class PasswordConfimationValidator : FormCustomValidator | |
{ | |
protected override bool OnServerValidate(string value) | |
{ | |
Control control = this.FindControl(this.classAtributes["confirmationControlId"]); | |
if (control != null) | |
return ((TextBox) control).Text == value; | |
else | |
return false; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment