Mistři v programování na #hovnokod

Java #1318

Jak jinak "dělat" validace :D

if (componentName.equals("Date of birth") || componentName.equals("Date of issue") || componentName.equals("Company listed on")) {
    final int maxLength = 10;
    TextFieldBWComposite<String> component = (TextFieldBWComposite<String>) createComponent(itemModel,settings);
    item.add(component);

    // Set Attributes Client side validation
    component.getFormComponent().add(new AttributeAppender("maxlength", new Model<String>("" + maxLength + ";"), ";"));

   }

Libor Laichmann,