rxweb / rxweb Goto Github PK
View Code? Open in Web Editor NEWTons of extensively featured packages for Angular, VUE and React Projects
Home Page: https://docs.rxweb.io
License: MIT License
Tons of extensively featured packages for Angular, VUE and React Projects
Home Page: https://docs.rxweb.io
License: MIT License
I want to restrict user to enter after specified rows value in textarea.
The framework should error message if the user exceeds the row limit of textarea or user should not able to enter further value.
less than equal to working example is not visible. A blank screen is there.
Working example should properly load.
Go to https://rxweb.github.io/reactive-form-validators/import-modules.html and click on the lessThanEqualTo validator link.
@rxweb/@
Any Browser
Not a bug
Let say I have an app to manage books and author.
I want a form to add books to an author.
Let say I'm loading an existing author with 3 books in his collection.
My Author.ts would be like
id : number
@required()
name : String
@propObject(Book)
books : Books[]
And my Book.ts
id : number
@required()
name : string
I then have a form :
<form [formGroup]="authorForm">
<mat-form-field >
<input matInput formControlName="name" />
</mat-form-field>
???
...
</form>
In the place of the ??? I tried with
<div formArrayName="books" >
<div *ngFor="let book of author.books">
<mat-form-field>
<input matInput formControlName="name" />
</mat-form-field>
</div>
</div>
Fields are correctly generated but input fields for book's names are empty although books do have a name. If I add a {{book.name}} in the loop I'm able to see it.
Do I miss something?
Thx!
@rxweb/[email protected]
Chrome
Required CUSIP validator
Details are available on https://en.wikipedia.org/wiki/CUSIP
minDate validation decorator is not working when input is entered incorrectly.
minDate Validator should take valid user input in proper format
Any Browser
minFiles is not working properly in file validator
Example : if minFiles is set upto 5 files , it does not validate 6 files.
minFiles should work properly in the file validator, if it is set to 5 files then entering 6 files in that field should be valid.
https://stackblitz.com/angular/bqxayrxvboo
@rxweb/@
@rxweb/reactive-form-validators 1.4.5
creditCard types(American Express, Diners Club) are showing invalid when user enters correct value.
Example :
371449635398431 in American Express shows invalid.
30569309025904 in Diners Club shows invalid.
creditCard types(American Express, Diners Club) should be valid when correct value is entered.
https://stackblitz.com/angular/krndqoaygrm
@rxweb/reactive-form-validators 1.4.5
MaxDate Validator is not working while user enters incorrect values.
Example
According to the MaxDate validator functionality, dates for example '15/7/2019' and '31/07/2018' should not be accepted but it is showing valid.
MaxDate Validator should take valid user input in proper format
Any Browser
28:44 should not be accepted.
Example
If i am entering 28:44, then it is accepting.
It should not be valid as per 24 hour format.
https://complete-rxweb-time-validation-add-angular-reactive-form.stackblitz.io/
Any Browser
"only alpha" and "only digit" is not working correctly.
pattern should work correctly on the basis of defined expression.
https://rxweb.io/form-validations/pattern/validators
@rxweb/@1.4.5
I have a User Model with 5 properties and I have applied respective validation decorators on properties. But I want to validate unique username from server.
The framework should allow to validate the value from server also.
How can I show the error message for the nested form group? I tried some example but no luck with that. Can someone please have a look at
stackblitz
URL validation decorator is valid in alternate characters.
Example
If i am entering https://www.google.com, then it is accepting. But when i am entering https://www.google.co or https://www.google.comm, it is not accepting. Similarly https://www.google.com.gfh is also accepting.
It should be valid, if user enters correct URL in the correct format only, otherwise it will be invalid.
Any Browser
maestro Card type not working in creditCard decorator
example : 6304268389753008 which is a valid maestro Card is showing invalid
valid maestro Card number should be accepted.
https://stackblitz.com/angular/plqxxydkong
@rxweb 1.4.5
Compare validator link is not working
Compare validator link should work properly
Any Browser
Required new validator for FQDN.
It should validate as per below wiki link,
Wiki Link : https://en.wikipedia.org/wiki/Fully_qualified_domain_name
RxFormBuilder should provide a feature to provide the object value in XML format.
If I want to post the data in the XML format, then this will be beneficial.
Currently there is no validator available, which invalidate when only space value in the FormControl .
It should invalidate if the FormControl persist only space value.
allowWhiteSpace description minor correction required. Instead of property try to use FormControl word in the description. Please refer this link : http://rxweb.io/validation-validators/alpha ; the same changes required in every validator/decorator documentation
It's not compatible with Angular 5.x
ERROR in node_modules/@rxweb/reactive-form-validators/services/rx-form-group.d.ts(1,51): error TS2305: Module '"/Users/mestrump/projects/work/MW_Credendo_Extranet/client/node_modules/@angular/forms/forms"' has no exported member 'AbstractControlOptions'.
AbstractControlOptions is an interface that is present in Angular since version 6.
In email validation, whitespace is allowed.
Example
If I am entering "[email protected] 4444" as an input in email validation, It is accepting such inputs.
Email validator should not accept whitespace.
Go to https://rxweb.github.io/reactive-form-validators/import-modules.html and click on the email validator link.
@rxweb/@
Any Browser
In yous example for propArray() you have address decorated with propArray(). I need to have multiple addresses that user can add with "Add Address" button. I found examples of how to implement it with Angular form builder, but I can't figure out or find example how to do it with RxFormBuilder. Is it even possible? Can you provide an example?
Sample of code to add multiple addresses on form built with RxFormBuilder.
@rxweb/
In every validator Basic example section, the content is not related to the current validator. Please refer this link http://rxweb.io/validation-validators/alpha
Current:
Expected:
deadlineDate: ['', Validators.required, RxwebValidators.minDate({value:new Date(7,7,2019)})]
core.js:12301 ERROR TypeError: Cannot read property 'seperator' of undefined
at DateProvider.push../node_modules/@rxweb/reactive-form-validators/@rxweb/reactive-form-validators.es5.js.DateProvider.isValid (reactive-form-validators.es5.js:1056)
at reactive-form-validators.es5.js:1175
at rxwebValidator (reactive-form-validators.es5.js:4202)
at forms.js:605
at Array.map (<anonymous>)
at _executeAsyncValidators (forms.js:605)
at FormControl.asyncValidator (forms.js:585)
at FormControl.push../node_modules/@angular/forms/fesm5/forms.js.AbstractControl._runAsyncValidator (forms.js:2516)
at FormControl.push../node_modules/@angular/forms/fesm5/forms.js.AbstractControl.updateValueAndValidity (forms.js:2489)
at FormControl.push../node_modules/@angular/forms/fesm5/forms.js.FormControl.setValue (forms.js:2828)
No Errors
Enter a date into the form field using mm/dd/yyyy format
"@rxweb/reactive-form-validators": "^1.4.1",
When I enter the value of 'Angular' in zero index textbox and again the same value in one index but the first letter is small like 'angular'. The FormControl is valid after entering the same value in two textbox of FormArray, which is incorrect behaviour.
FormControl should be invalid. because the values are the same.
@rxweb/[email protected]
When to use section point 3 show the conditional validation based on the country name 'Australia' but the example shows the conditional based on the country name 'India'. The country name should be changed in point 3.
please refer this link : http://rxweb.io/validation-validators/alpha
The same changes should be required in every validator/decorator.
Validation framework users are confused about how to create a FormArray object inside the FormGroup via RxFormBuilder. Please ref this ticket: #27
I have created a sample example which we can use in the documentation guide.
Url Validator is not giving error for 'https:/#/www.google.com/'.
Url validator should give error for invalid inputs.
https://rxweb.io/form-validations/url/decorators
@rxweb/@
Please refer alpha decorator example . go to the basic alpha validation example, if you see the model example of alpha which imports 'prop' decorator but that's not used in the model. if it's nowhere used then remove it because it creates confusion.
The same has been repeated in every decorator example.
Add a documentation of Unique validator on the site and readme doc of validators.
refer this https://stackoverflow.com/questions/53933229/update-form-with-validation-not-working-until-atleast-one-value-is-changed-in-th/53943990#53943990
When I try to use 1.1.5 version of your package I got:
ERROR in Error: Metadata version mismatch for module .../node_modules/@rxweb/reactive-form-validators/rxweb-reactive-form-validators.d.ts, found version 4, expected 3, resolving symbol UiModule in /src/app/ui/ui.module.ts, resolving symbol UiModule in /src/app/ui/ui.module.ts ...
Can you point what can be wrong. Is it really incompatible with ng4?
ps. RxReactiveFormsModule is exported from submodule but when I import it directly in the AppRootModule it works.
As discussed with @bruceauyeung on our gitter channel. Compose validator should have own message property. Where user clubs the validators and wants to show a single validation message.
As @bruceauyeung scenario :
A username required, only letters, digits,underscores are allowed and at most 50 characters, i wanna give the user a message 'only letters, digits,underscores are allowed and at most 50 characters are allowed'
@bruceauyeung feel free to add more if I missed something.
message property is used for applying the custom message on respective validation. But the message property description is incorrect.
Please refer this link: http://rxweb.io/validation-validators/alpha
I have created a form with below configuration userInfoFormGroup: FormGroup = this.formBuilder.group({ time: [1, RxwebValidators.compose({ validators: [ RxwebValidators.required(), RxwebValidators.numeric({ acceptValue: NumericValueType.PositiveNumber, allowDecimal: false }) ] })] });
Now I am setting the form value with form REST method. For now I am doing this in onInit event. you may assume this will happen after any http response.
So if I am setting the value 0 is is showing me the error like.
this field is require
. If I set the value grater than 0 it is working as expected.
It should not show the field is required.
https://stackblitz.com/edit/angular-ztqn7k?file=src%2Fapp%2Fapp.component.ts
@rxweb/@
Required IMEI validator
It should work as per the given wiki link https://en.wikipedia.org/wiki/International_Mobile_Equipment_Identity
Required UUID validator
It should work like given wiki link : https://en.wikipedia.org/wiki/Universally_unique_identifier
Add @propObject decorator example on the site. I have created an example of propObject which we can use in the documentation as a guide.
Required GRid ( Global Release Identifier ) validator
you can find the details from wiki : https://en.wikipedia.org/wiki/Global_Release_Identifier
Bug report or Feature request
Abstraction is not possible.
I created a class with common attributes and exteded it in other more specific classes, as you can see bellow:
// user.model.ts
class Contact {
@required()
type: string;
@required()
primary: boolean;
}
export class PhoneNumber extends Contact {
@required()
phoneNumber: string;
}
export class Email extends Contact {
@required()
@email()
email: string;
}
export class User {
@required()
usernamename: string;
@propArray(PhoneNumber)
phoneNumbers: PhoneNumber[];
@propArray(Email)
emails: Email[];
}
// app.component.ts
...
export class AppComponent implements OnInit {
userForm: FormGroup;
constructor(private fb: RxFormBuilder) { }
ngOnInit() {
const user = new User();
const phoneNumber = new PhoneNumber();
const email = new Email();
user.phoneNumbers = new Array<PhoneNumber>();
user.phoneNumbers.push(phoneNumber);
user.emails = new Array<Email>();
user.emails.push(email);
this.userForm = this.fb.formGroup(user);
}
...
}
I expected that the type
and primary
controls would be present in the phoneNumber group object, but they are not. Only the attribute defined in PhoneNumber class is part of the phoneNumber group, the same happens with Email class and email group.
You can see the console in the example app I built in SlackBlitz.
https://stackblitz.com/edit/angular-7ubjvp
@rxweb/[email protected]
Json validation decorator is valid if I enter any Numeric or Boolean value.
It should be valid, if user enters correct JSON schema only, otherwise it will be invalid.
https://stackblitz.com/edit/complete-rxweb-json-validation-add-angular-reactive-form
Any Browser
Password Validator Example not working properly. it gives console error of Error: Cannot read property 'message' of undefined when entering input value.
It should be working properly, if user enters correct password based on validation property,
Any Browser
Code example for decorators prop, propArray, propObject do not work in stackblitz.com
Sample code to actually work
https://rxweb.io/decorators/propArray/decorators
@rxweb/
Point 5 is a little bit confusing what exactly this covered. I believe the syntax should be different as per given example in the doc. please refer this link : http://rxweb.io/validation-decorators/alpha
Current:
The sample corrections should be required in every decorators.
Time validator allow seconds property is not working property , when allow seconds property is set true it does not allow seconds
Allow second property should allow second if it is set true
###URL
https://stackblitz.com/github/rxweb/rxweb/tree/dev/docs/examples/reactive-form-validators/time/complete-rxweb-time-validation-add-angular-reactive-form
###Browser
Any Browser
Credit Card Validator Link is not working. It is displaying 404 Not Found Error.
Validator link must be working, and should navigate to the desired route.
Go to https://rxweb.github.io/reactive-form-validators/import-modules.html link and click Credit Card Validator link.
https://rxweb.github.io/reactive-form-validators/validation-decorators/creditcard.html
@rxweb/@
Any Browser
Accessor decorators not work.
Allow the use of external classes with accessor decorators or other manner.
class ClassName {
private _classProperty: ExternalClass;
set classProperty(property: string | ExternalClass) {
if (property instanceof ExternalClass) {
this._classProperty = property;
} else {
this._classProperty = ExternalClass.convert(property);
}
}
get classProperty() {
return this._classProperty;
}
}
This can expande the use of the validators and the library itself.
@rxweb/[email protected]
https://stackblitz.com/angular/rdapbxjraln?file=src%2Fapp%2Fpattern-add.component.ts
even if you type in only letters, it still validate to false.
i can reproduce this bug in my local env.
@rxweb/@
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.