Skip to content

Commit

Permalink
fix(docs): remove invalid import (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
KernelPanic92 committed Apr 2, 2021
1 parent 31acff1 commit 21247c0
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ export class Post {
If you want to set a validator on a class or a property, you can do it by specifying `validators` option to `@Form`, `@FormControl`,`@FormGroup` or `@FormArray` decorators

```typescript
import { FormControl, Validator } from 'rx-form-mapper';
import { FormControl } from 'rx-form-mapper';

export class User {

Expand All @@ -312,7 +312,7 @@ export class User {
If you want to set an AsyncValidator on a class or a property, you can do it by specifying `asyncValidators` option to `@Form`, `@FormControl`,`@FormGroup` or `@FormArray` decorators

```typescript
import { FormControl, Validator } from 'rx-form-mapper';
import { FormControl } from 'rx-form-mapper';

const asyncValidator = (control: AbstractControl) => return of(undefined);

Expand Down Expand Up @@ -353,7 +353,7 @@ export class UniqueNameValidator implements AsyncValidator {
And pass it's type as validator or asyncValidator option

```typescript
import { FormControl, AsyncValidator } from 'rx-form-mapper';
import { FormControl } from 'rx-form-mapper';
import { UniqueNameValidator } from 'src/app/validators/unique-Name.validator';

export class User {
Expand All @@ -371,8 +371,7 @@ export class User {
Sometimes you want to change the default strategy of form validation, you can do it specifying `updateOn` option to `@Form`, `@FormControl`,`@FormGroup` or `@FormArray` decorators

```typescript
import { FormControl, AsyncValidator } from 'rx-form-mapper';
import { UniqueNameValidator } from 'src/app/validators/unique-Name.validator';
import { FormControl } from 'rx-form-mapper';

export class User {

Expand Down

0 comments on commit 21247c0

Please sign in to comment.