|
12 | 12 | import com.magento.idea.magento2plugin.actions.generation.data.ControllerFileData;
|
13 | 13 | import com.magento.idea.magento2plugin.actions.generation.dialog.validator.annotation.FieldValidation;
|
14 | 14 | import com.magento.idea.magento2plugin.actions.generation.dialog.validator.annotation.RuleRegistry;
|
| 15 | +import com.magento.idea.magento2plugin.actions.generation.dialog.validator.rule.AlphanumericRule; |
15 | 16 | import com.magento.idea.magento2plugin.actions.generation.dialog.validator.rule.NotEmptyRule;
|
| 17 | +import com.magento.idea.magento2plugin.actions.generation.dialog.validator.rule.PhpClassRule; |
| 18 | +import com.magento.idea.magento2plugin.actions.generation.dialog.validator.rule.PhpNamespaceNameRule; |
| 19 | +import com.magento.idea.magento2plugin.actions.generation.dialog.validator.rule.StartWithNumberOrCapitalLetterRule; |
16 | 20 | import com.magento.idea.magento2plugin.actions.generation.generator.ModuleControllerClassGenerator;
|
17 | 21 | import com.magento.idea.magento2plugin.magento.files.ControllerBackendPhp;
|
18 | 22 | import com.magento.idea.magento2plugin.magento.files.ControllerFrontendPhp;
|
@@ -59,18 +63,18 @@ public class NewControllerDialog extends AbstractDialog {
|
59 | 63 |
|
60 | 64 | @FieldValidation(rule = RuleRegistry.NOT_EMPTY,
|
61 | 65 | message = {NotEmptyRule.MESSAGE, CONTROLLER_NAME})
|
62 |
| - @FieldValidation(rule = RuleRegistry.START_WITH_NUMBER_OR_CAPITAL_LETTER, |
63 |
| - message = {NotEmptyRule.MESSAGE, CONTROLLER_NAME}) |
64 |
| - @FieldValidation(rule = RuleRegistry.ALPHANUMERIC, |
65 |
| - message = {NotEmptyRule.MESSAGE, CONTROLLER_NAME}) |
66 |
| - @FieldValidation(rule = RuleRegistry.PHP_CLASS, |
67 |
| - message = {NotEmptyRule.MESSAGE, CONTROLLER_NAME}) |
| 66 | + @FieldValidation(rule = RuleRegistry.PHP_NAMESPACE_NAME, |
| 67 | + message = {PhpNamespaceNameRule.MESSAGE, CONTROLLER_NAME}) |
68 | 68 | private JTextField controllerName;
|
69 | 69 |
|
70 | 70 | @FieldValidation(rule = RuleRegistry.NOT_EMPTY,
|
71 | 71 | message = {NotEmptyRule.MESSAGE, ACTION_NAME})
|
72 |
| - @FieldValidation(rule = RuleRegistry.PHP_NAMESPACE_NAME, |
73 |
| - message = {NotEmptyRule.MESSAGE, ACTION_NAME}) |
| 72 | + @FieldValidation(rule = RuleRegistry.START_WITH_NUMBER_OR_CAPITAL_LETTER, |
| 73 | + message = {StartWithNumberOrCapitalLetterRule.MESSAGE, ACTION_NAME}) |
| 74 | + @FieldValidation(rule = RuleRegistry.ALPHANUMERIC, |
| 75 | + message = {AlphanumericRule.MESSAGE, ACTION_NAME}) |
| 76 | + @FieldValidation(rule = RuleRegistry.PHP_CLASS, |
| 77 | + message = {PhpClassRule.MESSAGE, ACTION_NAME}) |
74 | 78 | private JTextField actionName;
|
75 | 79 |
|
76 | 80 | /**
|
|
0 commit comments