passwordeditor.java
来自「webwork source」· Java 代码 · 共 35 行
JAVA
35 行
/* * WebWork, Web Application Framework * * Distributable under Apache license. * See terms of license at opensource.org */package webwork.examples.userreg;import webwork.action.ValidationEditorSupport;/** * @see java.beans.PropertyEditorSupport * @see ValidationEditorSupport * @author Kjetil H.Paulsen (kjetil@java.no) * @version $Revision: 1.3 $ */public class PasswordEditor extends ValidationEditorSupport { public void setAsText(String txt) { if (txt.length() == 0) { throw new IllegalArgumentException("Password must be given"); } // Validate name if (txt.length() < 4) { throw new IllegalArgumentException("Password must be more than 4 characters"); } setValue(txt); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?