Source code: com/clra/web/ValidateMemberName.java
1 /*
2 * Copyright (c) Carnegie Lake Rowing Association 2002. All rights reserved.
3 * Distributed under the GPL license. See doc/COPYING.
4 * $RCSfile: ValidateMemberName.java,v $
5 * $Date: 2003/02/26 03:38:46 $
6 * $Revision: 1.5 $
7 */
8
9 package com.clra.web;
10
11 import org.apache.struts.action.ActionError;
12 import org.apache.struts.action.ActionErrors;
13
14 /**
15 * Checks whether a member's name is complete.
16 *
17 * @version $Id: ValidateMemberName.java,v 1.5 2003/02/26 03:38:46 rphall Exp $
18 * @author <a href="mailto:rphall@pluto.njcc.com">Rick Hall</a>
19 */
20 class ValidateMemberName extends ValidateMember {
21
22 public final static String PROPERTY_MEMBERNAME = "accountYear";
23
24 ValidateMemberName( MemberInfoForm f ) {
25 super( f );
26 }
27
28 /**
29 * Checks whether a member's name is complete.
30 */
31 void validate( ActionErrors errors ) {
32 if ( errors == null ) {
33 throw new IllegalArgumentException( "null action errors" );
34 }
35
36 String messageKey = "validate.member.name.first";
37 String value = this.form.getFirstName();
38 validateRequiredValue( PROPERTY_MEMBERNAME, messageKey, value, errors );
39
40 messageKey = "validate.member.name.last";
41 value = this.form.getLastName();
42 validateRequiredValue( PROPERTY_MEMBERNAME, messageKey, value, errors );
43
44 }
45
46 } // ValidateMemberName
47
48 /*
49 * $Log: ValidateMemberName.java,v $
50 * Revision 1.5 2003/02/26 03:38:46 rphall
51 * Added copyright and GPL license
52 *
53 * Revision 1.4 2003/02/19 22:38:40 rphall
54 * Removed gratuitous use of CLRA acronym
55 *
56 * Revision 1.3 2003/02/19 03:28:35 rphall
57 * Changed final property member to static
58 *
59 * Revision 1.2 2003/02/18 04:37:39 rphall
60 * Working for MEMBEREDIT, ADMINEDIT, ADMINCREATE
61 *
62 * Revision 1.1 2003/02/11 21:13:15 rphall
63 * Separate class for specific validation task; stubbed implementation
64 *
65 */
66